Clean up applying/reverting pending commits a bit.

* magit.el (magit-apply-item, magit-cherry-pick, magit-revert-item):
Don't bother to check return value of magit-apply-commit, it either
succeeds or throws an error.
This commit is contained in:
Marius Vollmer 2008-09-14 21:42:01 +03:00
parent 4b3f8fb86a
commit 9214dccd6f

View file

@ -1682,9 +1682,9 @@ Please see the manual for a complete description of Magit.
(interactive)
(magit-section-case (item info "apply")
((pending commit)
(when (magit-apply-commit info)
(magit-rewrite-set-commit-property info 'used t)
(magit-refresh)))
(magit-apply-commit info)
(magit-rewrite-set-commit-property info 'used t)
(magit-refresh))
((commit)
(magit-apply-commit info))
((unstaged *)
@ -1700,9 +1700,9 @@ Please see the manual for a complete description of Magit.
(interactive)
(magit-section-case (item info "cherry-pick")
((pending commit)
(when (magit-run "git" "cherry-pick" info)
(magit-rewrite-set-commit-property info 'used t)
(magit-refresh)))
(magit-run "git" "cherry-pick" info)
(magit-rewrite-set-commit-property info 'used t)
(magit-refresh))
((commit)
(magit-run "git" "cherry-pick" info))))
@ -1715,9 +1715,9 @@ Please see the manual for a complete description of Magit.
(interactive)
(magit-section-case (item info "revert")
((pending commit)
(when (magit-revert-commit info)
(magit-rewrite-set-commit-property info 'used nil)
(magit-refresh)))
(magit-revert-commit info)
(magit-rewrite-set-commit-property info 'used nil)
(magit-refresh))
((commit)
(magit-revert-commit info))
((hunk)