From cebf8ec6d91c0199eed87a182b69cebbb1d9ffbb Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Sun, 6 Dec 2009 21:25:55 +0000 Subject: [PATCH] Make vc-revert change VC state from 'added to 'unregistered. * vc-git.el (vc-git-revert): Call git reset first. --- lisp/ChangeLog | 5 +++++ lisp/vc-git.el | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 712507bcea3..38a9a1c0817 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2009-12-06 Dan Nicolaescu + + Make vc-revert change VC state from 'added to 'unregistered. + * vc-git.el (vc-git-revert): Call git reset first. + 2009-12-06 Ulf Jasper * net/newst-backend.el : diff --git a/lisp/vc-git.el b/lisp/vc-git.el index a33a0f51d7d..f44679d4333 100644 --- a/lisp/vc-git.el +++ b/lisp/vc-git.el @@ -535,7 +535,8 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." "Revert FILE to the version stored in the git repository." (if contents-done (vc-git-command nil 0 file "update-index" "--") - (vc-git-command nil 0 file "checkout" "HEAD"))) + (vc-git-command nil 0 file "reset" "-q" "--") + (vc-git-command nil nil file "checkout" "-q" "--"))) ;;; HISTORY FUNCTIONS -- 2.39.5