mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-12 08:36:25 -04:00
Revert "Add GlobalArg/GlobalArgIf to GitCommandBuilder"
After the previous commit this is no longer needed.
This reverts commit 94db69f64b.
This commit is contained in:
parent
ccaa96b29d
commit
4fcf6ddb5f
|
|
@ -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...)
|
||||
|
|
|
|||
Loading…
Reference in a new issue