diff options
author | Pavlo Strokov <pstrokov@gitlab.com> | 2021-02-17 20:17:19 +0300 |
---|---|---|
committer | Pavlo Strokov <pstrokov@gitlab.com> | 2021-02-18 15:35:30 +0300 |
commit | af41ac8588e54d6a54ce49d247934be1a81d0e39 (patch) | |
tree | 41be19b0ae23b918a41c7ad8824dda28eab0fdc3 /internal/testhelper | |
parent | 3e8e8019dcda04bfdf03d6cca5af2a80254ada40 (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.go | 4 |
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) } |