From 18c639c78b573126451f510262ed4d60da309ed9 Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Mon, 2 Dec 2024 15:44:35 +0100 Subject: [PATCH] rename fixResponsePath to ensureWorkspacePrefix --- libs/git/info.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/git/info.go b/libs/git/info.go index 36d35caa..eb8525f8 100644 --- a/libs/git/info.go +++ b/libs/git/info.go @@ -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, @@ -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 }