Revert files when stopping the rewrite at the end of a magit-rewrite-finish.
This commit is contained in:
parent
c66e0c5466
commit
dc283dec8f
1 changed files with 10 additions and 7 deletions
17
magit.el
17
magit.el
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue