X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/de8efe1efc4a495eca0614aa9f6c1910d5838f99..6779943525a1cde7dba8a98ea373b5f5461c436e:/contrib/stgit.el diff --git a/contrib/stgit.el b/contrib/stgit.el index 487b891..f7396e6 100644 --- a/contrib/stgit.el +++ b/contrib/stgit.el @@ -144,12 +144,14 @@ to toggle this setting and to control how many commits are shown." :type 'boolean :group 'stgit + :link '(variable-link stgit-default-committed-count) :link '(variable-link stgit-show-committed)) (defcustom stgit-default-committed-count 5 "The number of historical commits to show when `stgit-show-committed' is enabled." :type 'number + :link '(variable-link stgit-default-show-committed) :link '(variable-link stgit-committed-count)) (defcustom stgit-default-show-patch-names t @@ -2331,16 +2333,13 @@ their position in the patch series, bottommost first. PATCHSYMS must not contain duplicate entries, unless ALLOW-DUPLICATES is not nil." - (let (sorted-patchsyms - (series (with-output-to-string - (with-current-buffer standard-output - (stgit-run-silent "series" "--noprefix")))) - start) - (while (string-match "^\\(.+\\)" series start) - (let ((patchsym (intern (match-string 1 series)))) - (when (memq patchsym patchsyms) - (setq sorted-patchsyms (cons patchsym sorted-patchsyms)))) - (setq start (match-end 0))) + (let (sorted-patchsyms) + (ewoc-map #'(lambda (patch) + (let ((name (stgit-patch->name patch))) + (when (memq name patchsyms) + (setq sorted-patchsyms (cons name sorted-patchsyms)))) + nil) + stgit-ewoc) (setq sorted-patchsyms (nreverse sorted-patchsyms)) (unless allow-duplicates