Skip to content
This repository was archived by the owner on Apr 12, 2019. It is now read-only.

Commit de4d716

Browse files
committed
use AddArguments
1 parent a151d12 commit de4d716

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tree_entry.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -285,16 +285,16 @@ func logCommand(exclusiveStart *Commit, state *getCommitInfoState) *Command {
285285
} else {
286286
commitString = "HEAD"
287287
}
288-
commandArgs := []string{"log", prettyLogFormat, "-" + strconv.Itoa(state.nextSearchSize), commitString, "--"}
288+
command := NewCommand("log", prettyLogFormat, "-" + strconv.Itoa(state.nextSearchSize), commitString, "--")
289289
state.nextSearchSize += state.nextSearchSize
290290
if (len(state.entries) - len(state.commits) < 32) {
291291
for path, entry := range state.entries {
292292
if _, ok := state.commits[entry.Name()]; !ok {
293-
commandArgs = append(commandArgs, path)
293+
command.AddArguments(path)
294294
}
295295
}
296296
} else {
297-
commandArgs = append(commandArgs, state.treePath)
297+
command.AddArguments(state.treePath)
298298
}
299-
return NewCommand(commandArgs...)
299+
return command
300300
}

0 commit comments

Comments
 (0)