From: Gustav HÃ¥llberg Date: Fri, 31 Jul 2009 08:55:26 +0000 (+0200) Subject: stgit.el: Garbage collect selected patches on reload X-Git-Tag: v0.15-rc2~11^2~37 X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/commitdiff_plain/03fc3b26aee0b216513b2077c6b009f896458ca1 stgit.el: Garbage collect selected patches on reload Signed-off-by: Gustav HÃ¥llberg --- 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."