Refresh buffer when rewrite-finish fails.

* magit.el (magit-rewrite-finish): Refresh after finishing, even when
an error has been thrown.
(magit-rewrite-finish-step): Don't refresh at all.
This commit is contained in:
Marius Vollmer 2008-09-15 01:55:46 +03:00
parent b68b2171cf
commit 35002f3d31

View file

@ -1485,7 +1485,10 @@ Please see the manual for a complete description of Magit.
(defun magit-rewrite-finish ()
(interactive)
(magit-rewrite-finish-step t))
(unwind-protect
(magit-rewrite-finish-step t)
(magit-revert-buffers)
(magit-refresh)))
(defun magit-rewrite-finish-step (first-p)
(let ((info (magit-read-rewrite-info)))
@ -1498,14 +1501,10 @@ Please see the manual for a complete description of Magit.
:from-end t))
(commit (car first-unused)))
(cond ((not first-unused)
(magit-revert-buffers)
(magit-rewrite-stop t))
((magit-cherry-pick-commit commit (not first-p) t)
(magit-rewrite-set-commit-property commit 'used t)
(magit-rewrite-finish-step nil))
(t
(magit-revert-buffers)
(magit-refresh))))))
(magit-rewrite-finish-step nil))))))
;;; Updating, pull, and push