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/safecmd_test.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/safecmd_test.go')
-rw-r--r--internal/git/safecmd_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/git/safecmd_test.go b/internal/git/safecmd_test.go
index 26099a2bd..3b0b2ba2d 100644
--- a/internal/git/safecmd_test.go
+++ b/internal/git/safecmd_test.go
@@ -340,7 +340,7 @@ func TestSafeCmdValid(t *testing.T) {
// ignore first 3 indeterministic args (executable path and repo args)
require.Equal(t, tt.expectArgs, cmd.Args()[3:])
- cmd, err = SafeBareCmd(ctx, tt.globals, tt.subCmd, opts...)
+ cmd, err = NewCommandWithoutRepo(ctx, tt.globals, tt.subCmd, opts...)
require.NoError(t, err)
// ignore first indeterministic arg (executable path)
require.Equal(t, tt.expectArgs, cmd.Args()[1:])