From 2c2b8ec2bf8797b55e3494c273b9a6ff13ff520d Mon Sep 17 00:00:00 2001 Message-Id: <2c2b8ec2bf8797b55e3494c273b9a6ff13ff520d.1718307837.git.mdw@distorted.org.uk> From: Mark Wooding Date: Wed, 12 May 2010 20:27:09 +0200 Subject: [PATCH] stgit.el: Improve how "t h" mode finds old commits MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Organization: Straylight/Edgeware From: Gustav HÃ¥llberg Use 'git log -' 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 Signed-off-by: David KÃ¥gedal --- contrib/stgit.el | 7 ++++--- 1 file 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 @@ (defun stgit-run-series (ewoc) (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 @@ (defun stgit-run-series (ewoc) (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") -- [mdw]