Use 'git log -<N>' to list historical commits. This avoids showing
more than stgit-committed-count patches (for merges) and does not
cause an error when running out of history.
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
(when stgit-show-committed
(let* ((show-svn stgit-show-svn)
(svn-hash stgit-svn-find-rev-hash)
- (base (stgit-id "{base}"))
- (range (format "%s~%d..%s" base stgit-committed-count base)))
+ (nentries (format "-%s" stgit-committed-count))
+ (base (stgit-id "{base}")))
(with-temp-buffer
(let* ((standard-output (current-buffer))
(fmt (stgit-line-format))
(exit-status (stgit-run-git-silent "--no-pager" "log"
"--reverse"
"--pretty=oneline"
- range)))
+ nentries
+ base)))
(goto-char (point-min))
(if (not (zerop exit-status))
(message "Failed to run git log")