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:
parent
7a4c29c739
commit
2a9806bfc6
2 changed files with 12 additions and 1 deletions
|
@ -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...),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue