From: Gustav Hållberg Date: Wed, 12 May 2010 18:27:09 +0000 (+0200) Subject: stgit.el: Improve how "t h" mode finds old commits X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/commitdiff_plain/2c2b8ec2bf8797b55e3494c273b9a6ff13ff520d stgit.el: Improve how "t h" mode finds old commits 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 --- 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")