Set pending commit to used only when cherry-pick was successful.

This commit is contained in:
Marius Vollmer 2008-09-14 00:23:38 +03:00
parent 57bc4a786d
commit 3d80d64b3c

View file

@ -1458,15 +1458,16 @@ Please see the manual for a complete description of Magit.
:from-end t))) :from-end t)))
(if (not first-unused) (if (not first-unused)
(magit-rewrite-stop) (magit-rewrite-stop)
(magit-rewrite-set-commit-property (car first-unused) 'used t)
(magit-run-command nil first-p (magit-run-command nil first-p
(list "git" "cherry-pick" (car first-unused)) (list "git" "cherry-pick" (car first-unused))
(list #'magit-rewrite-finish-continuation)))))) (list #'magit-rewrite-finish-continuation
(car first-unused)))))))
(defun magit-rewrite-finish-continuation (successp commit)
(when successp
(magit-rewrite-set-commit-property commit 'used t)
(magit-rewrite-finish-step nil)))
(defun magit-rewrite-finish-continuation (successp)
(if successp
(magit-rewrite-finish-step nil)))
;;; Updating, pull, and push ;;; Updating, pull, and push
(defun magit-remote-update () (defun magit-remote-update ()