Revert files when stopping the rewrite at the end of a magit-rewrite-finish.

This commit is contained in:
Marius Vollmer 2008-09-14 01:14:39 +03:00
parent c66e0c5466
commit dc283dec8f

View file

@ -1461,19 +1461,22 @@ Please see the manual for a complete description of Magit.
(not (plist-get (cdr p) 'used))) (not (plist-get (cdr p) 'used)))
pending pending
:from-end t))) :from-end t)))
(if (not first-unused) (cond ((not first-unused)
(magit-rewrite-stop t) (magit-revert-files)
(magit-run-command nil first-p (magit-rewrite-stop t))
(list "git" "cherry-pick" (car first-unused)) (t
(list #'magit-rewrite-finish-continuation (magit-run-command nil first-p
(car first-unused))))))) (list "git" "cherry-pick" (car first-unused))
(list #'magit-rewrite-finish-continuation
(car first-unused))))))))
(defun magit-rewrite-finish-continuation (successp commit) (defun magit-rewrite-finish-continuation (successp commit)
(cond (successp (cond (successp
(magit-rewrite-set-commit-property commit 'used t) (magit-rewrite-set-commit-property commit 'used t)
(magit-rewrite-finish-step nil)) (magit-rewrite-finish-step nil))
(t (t
(magit-run-command-standard-continuation successp)))) (magit-revert-files)
(magit-refresh))))
;;; Updating, pull, and push ;;; Updating, pull, and push