From: Gustav Hållberg Date: Wed, 12 May 2010 18:14:14 +0000 (+0200) Subject: stgit.el: Repair ! for historical commits X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/commitdiff_plain/b4f12bc1acd2892a76e07bbf6ad34b2da1c455b5 stgit.el: Repair ! for historical commits Fixes omission in 8f489f41f8ffe6e06254cefc5b352610df06cbeb. Signed-off-by: Gustav Hållberg Signed-off-by: David Kågedal --- diff --git a/contrib/stgit.el b/contrib/stgit.el index 487b891..b72ba98 100644 --- a/contrib/stgit.el +++ b/contrib/stgit.el @@ -2331,16 +2331,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