From 03fc3b26aee0b216513b2077c6b009f896458ca1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gustav=20H=C3=A5llberg?= Date: Fri, 31 Jul 2009 10:55:26 +0200 Subject: [PATCH] stgit.el: Garbage collect selected patches on reload MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Gustav HÃ¥llberg --- contrib/stgit.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/contrib/stgit.el b/contrib/stgit.el index 01a44d2..3ce2eaf 100644 --- a/contrib/stgit.el +++ b/contrib/stgit.el @@ -198,7 +198,8 @@ Returns nil if there was no output." stgit-worktree-node nil) (let ((inserted-index (not stgit-show-worktree)) index-node - worktree-node) + worktree-node + all-patchsyms) (with-temp-buffer (let ((exit-status (stgit-run-silent "series" "--description" "--empty"))) (goto-char (point-min)) @@ -228,6 +229,7 @@ Returns nil if there was no output." (eq state 'unapplied))) (setq inserted-index t) (stgit-run-series-insert-index ewoc))) + (setq all-patchsyms (cons name all-patchsyms)) (ewoc-enter-last ewoc (make-stgit-patch :status state @@ -238,7 +240,9 @@ Returns nil if there was no output." (unless inserted-index (stgit-run-series-insert-index ewoc))) (setq stgit-index-node index-node - stgit-worktree-node worktree-node))) + stgit-worktree-node worktree-node + stgit-marked-patches (intersection stgit-marked-patches + all-patchsyms)))) (defun stgit-reload () "Update the contents of the StGit buffer." -- 2.11.0