Make reverting work with unclean working trees.
* magit.el (magit-revert-item): Like with magit-apply-item, use diff plus apply instead of revert so that we can work with a unclean working tree.
This commit is contained in:
parent
c1cce797d0
commit
12ae7132c4
1 changed files with 2 additions and 2 deletions
4
magit.el
4
magit.el
|
@ -1075,8 +1075,8 @@ Please see the manual for a complete description of Magit.
|
|||
(magit-item-case (item info "revert")
|
||||
((commit)
|
||||
(magit-append-to-log-edit
|
||||
(magit-format-commit info "Reverting %h, %s"))
|
||||
(magit-run "git" "revert" "--no-commit" info))))
|
||||
(magit-format-commit info "Reverting \"%s\""))
|
||||
(magit-run-shell "git diff %s^ %s | git apply --reverse -" info info))))
|
||||
|
||||
(defvar magit-currently-shown-commit nil)
|
||||
|
||||
|
|
Loading…
Reference in a new issue