From e7a49a249daa582dce8f74b4e9be775c21d70d61 Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Tue, 3 Dec 2024 09:42:09 +0100 Subject: [PATCH] clarify comment --- libs/git/info.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/git/info.go b/libs/git/info.go index 88398eb8..5df69f7e 100644 --- a/libs/git/info.go +++ b/libs/git/info.go @@ -44,9 +44,9 @@ type response struct { // - If there were any errors when trying to determine git root (e.g. API call returned an error or there were permission issues // reading the file system), all strings fields of GitRepositoryInfo will be "" and err will be non-nil. // - For convenience, GuessedWorktreeRoot parameter will be set to path in the above two cases. -// - If we could determine git worktree root but there were errors when reading metadata (origin, branch, commit), those errors will be logged -// as warnings, GitRepositoryInfo will have non-empty WorktreeRoot and corresponding GuessedWorktreeRoot. -// Other strings fields will be "" and err will be nil. +// - If we could determine git worktree root but there were errors when reading metadata (origin, branch, commit), those errors +// will be logged as warnings, GitRepositoryInfo is guaranteed to have non-empty WorktreeRoot and corresponding GuessedWorktreeRoot +// and other fields on best effort basis. The err will be nil. // - In successful case, all fields are set to proper git repository metadata. func FetchRepositoryInfo(ctx context.Context, path vfs.Path, w *databricks.WorkspaceClient) (GitRepositoryInfo, error) { if strings.HasPrefix(path.Native(), "/Workspace/") && dbr.RunsOnRuntime(ctx) {