Skip to content

Commit

Permalink
rename fixResponsePath to ensureWorkspacePrefix
Browse files Browse the repository at this point in the history
  • Loading branch information
denik committed Dec 2, 2024
1 parent d4237ae commit 18c639c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/git/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func fetchRepositoryInfoAPI(ctx context.Context, path vfs.Path, w *databricks.Wo
if gi == nil {
log.Warnf(ctx, "Failed to load git info from %s", apiEndpoint)
} else {
fixedPath := fixResponsePath(gi.Path)
fixedPath := ensureWorkspacePrefix(gi.Path)
return GitRepositoryInfo{
OriginURL: gi.URL,
LatestCommit: gi.HeadCommitID,
Expand All @@ -84,7 +84,7 @@ func fetchRepositoryInfoAPI(ctx context.Context, path vfs.Path, w *databricks.Wo
}, nil
}

func fixResponsePath(path string) string {
func ensureWorkspacePrefix(path string) string {
if !strings.HasPrefix(path, "/Workspace/") {
return "/Workspace/" + path
}
Expand Down

0 comments on commit 18c639c

Please sign in to comment.