From b4f12bc1acd2892a76e07bbf6ad34b2da1c455b5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gustav=20H=C3=A5llberg?= Date: Wed, 12 May 2010 20:14:14 +0200 Subject: [PATCH] stgit.el: Repair ! for historical commits MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes omission in 8f489f41f8ffe6e06254cefc5b352610df06cbeb. Signed-off-by: Gustav HÃ¥llberg Signed-off-by: David KÃ¥gedal --- contrib/stgit.el | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) 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 -- 2.11.0