File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
pkg/commands/git_commands Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -605,6 +605,11 @@ func (self *CommitLoader) getLogCmd(opts GetCommitsOptions) *oscommands.CmdObj {
605605 refSpec += "..." + opts .RefToShowDivergenceFrom
606606 }
607607
608+ var limitArg string
609+ if opts .LogLimit != nil {
610+ limitArg = fmt .Sprintf ("--max-count=%d" , opts .LogLimit .Limit )
611+ }
612+
608613 cmdArgs := NewGitCmd ("log" ).
609614 Arg (refSpec ).
610615 ArgIf (gitLogOrder != "default" , "--" + gitLogOrder ).
@@ -613,7 +618,7 @@ func (self *CommitLoader) getLogCmd(opts GetCommitsOptions) *oscommands.CmdObj {
613618 Arg (prettyFormat ).
614619 Arg ("--abbrev=40" ).
615620 ArgIf (opts .FilterAuthor != "" , "--author=" + opts .FilterAuthor ).
616- ArgIf (opts . LogLimit != nil , fmt . Sprintf ( "--max-count=%d " , opts . LogLimit . Limit ) ).
621+ ArgIf (limitArg != " " , limitArg ).
617622 ArgIf (opts .FilterPath != "" , "--follow" , "--name-status" ).
618623 Arg ("--no-show-signature" ).
619624 ArgIf (opts .RefToShowDivergenceFrom != "" , "--left-right" ).
You can’t perform that action at this time.
0 commit comments