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>2021-01-13 19:10:58 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2021-01-14 09:46:55 +0300
commit4067e01561e16832b12dd21abe197a00d08b8a7f (patch)
treeec180b38c99cb16768fe419112071da132b8e887 /internal/git/reference.go
parent74b9526f1938dff252f94f39dd4d92e1970688bc (diff)
git: Rename SafeBareCmd() to NewCommandWithoutRepository()
Back when we introduced the Git DSL, we still had conflicting sets of safe and unsafe functions. Because of this legacy, our safe set of functions is still has the "Safe" prefix. This commit now ends that chapter and renames `SafeBareCmd()`. The previous name has been quite confusing, given that "bare" in the world of git typically means a repository without a working directory. That was not the intended meaning though, but instead that the command is not run with an associated repository. It's thus renamed to `NewCommandWithoutRepository()`.
Diffstat (limited to 'internal/git/reference.go')
-rw-r--r--internal/git/reference.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/git/reference.go b/internal/git/reference.go
index 12a2eb828..269f3db69 100644
--- a/internal/git/reference.go
+++ b/internal/git/reference.go
@@ -48,7 +48,7 @@ func CheckRefFormat(ctx context.Context, refName string) (bool, error) {
stdout := &bytes.Buffer{}
stderr := &bytes.Buffer{}
- cmd, err := SafeBareCmd(ctx, nil,
+ cmd, err := NewCommandWithoutRepo(ctx, nil,
SubCmd{
Name: "check-ref-format",
Args: []string{refName},