reorder to improve readability

This commit is contained in:
Denis Bilenko 2024-12-02 15:49:28 +01:00
parent e49f2f3110
commit 97c8042fd6
1 changed files with 2 additions and 3 deletions

View File

@ -67,9 +67,7 @@ func fetchRepositoryInfoAPI(ctx context.Context, path vfs.Path, w *databricks.Wo
// Check if GitInfo is present and extract relevant fields // Check if GitInfo is present and extract relevant fields
gi := response.GitInfo gi := response.GitInfo
if gi == nil { if gi != nil {
log.Warnf(ctx, "Failed to load git info from %s", apiEndpoint)
} else {
fixedPath := ensureWorkspacePrefix(gi.Path) fixedPath := ensureWorkspacePrefix(gi.Path)
return GitRepositoryInfo{ return GitRepositoryInfo{
OriginURL: gi.URL, OriginURL: gi.URL,
@ -79,6 +77,7 @@ func fetchRepositoryInfoAPI(ctx context.Context, path vfs.Path, w *databricks.Wo
}, nil }, nil
} }
log.Warnf(ctx, "Failed to load git info from %s", apiEndpoint)
return GitRepositoryInfo{ return GitRepositoryInfo{
WorktreeRoot: path, WorktreeRoot: path,
}, nil }, nil