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:
authorPavlo Strokov <pstrokov@gitlab.com>2021-02-17 20:17:19 +0300
committerPavlo Strokov <pstrokov@gitlab.com>2021-02-18 15:35:30 +0300
commitaf41ac8588e54d6a54ce49d247934be1a81d0e39 (patch)
tree41be19b0ae23b918a41c7ad8824dda28eab0fdc3 /internal/testhelper
parent3e8e8019dcda04bfdf03d6cca5af2a80254ada40 (diff)
Make CreateRemoteBranch dependent on provided git bin
CreateRemoteBranch used hardcoded git execution name. This commit changes it, so it now accepts git bin path from the caller. Part of: https://gitlab.com/gitlab-org/gitaly/-/issues/2699
Diffstat (limited to 'internal/testhelper')
-rw-r--r--internal/testhelper/git_branch.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/testhelper/git_branch.go b/internal/testhelper/git_branch.go
index 617a851ce..07351578c 100644
--- a/internal/testhelper/git_branch.go
+++ b/internal/testhelper/git_branch.go
@@ -3,7 +3,7 @@ package testhelper
import "testing"
// CreateRemoteBranch creates a new remote branch
-func CreateRemoteBranch(t testing.TB, repoPath, remoteName, branchName, ref string) {
- MustRunCommand(t, nil, "git", "-C", repoPath, "update-ref",
+func CreateRemoteBranch(t testing.TB, gitBin, repoPath, remoteName, branchName, ref string) {
+ MustRunCommand(t, nil, gitBin, "-C", repoPath, "update-ref",
"refs/remotes/"+remoteName+"/"+branchName, ref)
}