Skip to content

Commit

Permalink
clarify comment
Browse files Browse the repository at this point in the history
  • Loading branch information
denik committed Dec 3, 2024
1 parent 8a31be7 commit e7a49a2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libs/git/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit e7a49a2

Please sign in to comment.