aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustav Hållberg <gustav@gmail.com>2010-05-12 20:27:09 +0200
committerGustav Hållberg <gustav@gmail.com>2010-06-10 09:25:36 +0200
commit2c2b8ec2bf8797b55e3494c273b9a6ff13ff520d (patch)
treec0878f02b885a5b3d1b0e1005d951620072fbdcc
parent006cd3e580ae0871ffcf435d724f58535dfa1b48 (diff)
downloadstgit-2c2b8ec2bf8797b55e3494c273b9a6ff13ff520d.tar.gz
stgit.el: Improve how "t h" mode finds old commits
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>
-rw-r--r--contrib/stgit.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/contrib/stgit.el b/contrib/stgit.el
index 0981eb5..83e8ea5 100644
--- a/contrib/stgit.el
+++ b/contrib/stgit.el
@@ -508,8 +508,8 @@ using (make-hash-table :test 'equal)."
(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))
@@ -518,7 +518,8 @@ using (make-hash-table :test 'equal)."
(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")