From 4fcf6ddb5f21701833069602793836764f419b4d Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Thu, 2 Jul 2026 16:49:00 +0200 Subject: [PATCH] Revert "Add GlobalArg/GlobalArgIf to GitCommandBuilder" After the previous commit this is no longer needed. This reverts commit 94db69f64b7b05840cdf2839bd987f856f9b1d63. --- pkg/commands/git_commands/git_command_builder.go | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/pkg/commands/git_commands/git_command_builder.go b/pkg/commands/git_commands/git_command_builder.go index ebd060928..f37681223 100644 --- a/pkg/commands/git_commands/git_command_builder.go +++ b/pkg/commands/git_commands/git_command_builder.go @@ -48,22 +48,6 @@ func (self *GitCommandBuilder) ArgIfElse(condition bool, ifTrue string, ifFalse return self.Arg(ifFalse) } -// GlobalArg adds top-level options for git itself (e.g. --no-optional-locks). -// Unlike Arg, these are prepended before the command, where git expects them. -func (self *GitCommandBuilder) GlobalArg(args ...string) *GitCommandBuilder { - self.args = append(append([]string{}, args...), self.args...) - - return self -} - -func (self *GitCommandBuilder) GlobalArgIf(condition bool, args ...string) *GitCommandBuilder { - if condition { - self.GlobalArg(args...) - } - - return self -} - func (self *GitCommandBuilder) Config(value string) *GitCommandBuilder { // config settings come before the command self.args = append([]string{"-c", value}, self.args...)