From 97c8042fd66c75ed629aa413a5c52f7c854a3d88 Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Mon, 2 Dec 2024 15:49:28 +0100 Subject: [PATCH] reorder to improve readability --- libs/git/info.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libs/git/info.go b/libs/git/info.go index eb8525f8c..f2e0d548d 100644 --- a/libs/git/info.go +++ b/libs/git/info.go @@ -67,9 +67,7 @@ func fetchRepositoryInfoAPI(ctx context.Context, path vfs.Path, w *databricks.Wo // Check if GitInfo is present and extract relevant fields gi := response.GitInfo - if gi == nil { - log.Warnf(ctx, "Failed to load git info from %s", apiEndpoint) - } else { + if gi != nil { fixedPath := ensureWorkspacePrefix(gi.Path) return GitRepositoryInfo{ OriginURL: gi.URL, @@ -79,6 +77,7 @@ func fetchRepositoryInfoAPI(ctx context.Context, path vfs.Path, w *databricks.Wo }, nil } + log.Warnf(ctx, "Failed to load git info from %s", apiEndpoint) return GitRepositoryInfo{ WorktreeRoot: path, }, nil