Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2020-08-19 14:28:23 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2020-08-20 14:20:19 +0300
commit8cf48086d19d1d53f535864c528a6c9888c99077 (patch)
treef1eee43304dad7468dd14c259e245e23a7c13ed9
parent7471d0b42e4c5250ed37e08c5de224eb87a900be (diff)
packfile: Fix `git show-index` using wrong Git executable
When reading the index in `internal/git/packfile`, we're directly executing the "git" executable which is thus going to be resolved via the PATH environment variable. Fix this to instead use the configured Git command.
-rw-r--r--internal/git/packfile/index.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/git/packfile/index.go b/internal/git/packfile/index.go
index 8f61544c3..29640bcb1 100644
--- a/internal/git/packfile/index.go
+++ b/internal/git/packfile/index.go
@@ -93,7 +93,7 @@ func ReadIndex(idxPath string) (*Index, error) {
return nil, err
}
- showIndex, err := command.New(ctx, exec.Command("git", "show-index"), f, nil, nil)
+ showIndex, err := command.New(ctx, exec.Command(command.GitPath(), "show-index"), f, nil, nil)
if err != nil {
return nil, err
}