Mercurial > emacs
comparison lisp/vc-git.el @ 106463:783bd2552dd4
Make vc-revert change VC state from 'added to 'unregistered.
* vc-git.el (vc-git-revert): Call git reset first.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Sun, 06 Dec 2009 21:25:55 +0000 |
parents | 8272f561b710 |
children | 67d9cb4f16c3 |
comparison
equal
deleted
inserted
replaced
106462:3affeccb7b33 | 106463:783bd2552dd4 |
---|---|
533 | 533 |
534 (defun vc-git-revert (file &optional contents-done) | 534 (defun vc-git-revert (file &optional contents-done) |
535 "Revert FILE to the version stored in the git repository." | 535 "Revert FILE to the version stored in the git repository." |
536 (if contents-done | 536 (if contents-done |
537 (vc-git-command nil 0 file "update-index" "--") | 537 (vc-git-command nil 0 file "update-index" "--") |
538 (vc-git-command nil 0 file "checkout" "HEAD"))) | 538 (vc-git-command nil 0 file "reset" "-q" "--") |
539 (vc-git-command nil nil file "checkout" "-q" "--"))) | |
539 | 540 |
540 ;;; HISTORY FUNCTIONS | 541 ;;; HISTORY FUNCTIONS |
541 | 542 |
542 (defun vc-git-print-log (files buffer &optional shortlog limit) | 543 (defun vc-git-print-log (files buffer &optional shortlog limit) |
543 "Get change log associated with FILES." | 544 "Get change log associated with FILES." |