Pre-calculate the absolute path of git (#6575)
* Pre-caculate the absolute path of git * Do not repeat string literals which has been defined somewhere Also make it flexible to accept customized/user-defined value.
This commit is contained in:
@ -41,7 +41,7 @@ func NewCommand(args ...string) *Command {
|
||||
cargs := make([]string, len(GlobalCommandArgs))
|
||||
copy(cargs, GlobalCommandArgs)
|
||||
return &Command{
|
||||
name: "git",
|
||||
name: GitExecutable,
|
||||
args: append(cargs, args...),
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user