From: Dmitry Gutov Date: Mon, 15 Dec 2014 14:18:34 +0000 (+0200) Subject: Fix vc-git-dir-status-files WRT up-to-date vs edited X-Git-Tag: emacs-24.4.90~132 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=061db13;p=emacs.git Fix vc-git-dir-status-files WRT up-to-date vs edited Fixes: debbugs:19386 * lisp/vc/vc-git.el (vc-git-after-dir-status-stage): Move `up-to-date' stage to after `diff-index'. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 204283ea705..b6bf86809c2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-12-15 Dmitry Gutov + + * vc/vc-git.el (vc-git-after-dir-status-stage): Move `up-to-date' + stage to after `diff-index' (bug#19386). + 2014-12-14 João Távora * textmodes/tex-mode.el (tex-insert-quote): Consider and respect diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index ae6b13a6c60..4c64d8374cb 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -380,8 +380,7 @@ or an empty string if none." (goto-char (point-min)) (pcase stage (`update-index - (setq next-stage (if (vc-git--empty-db-p) 'ls-files-added - (if files 'ls-files-up-to-date 'diff-index)))) + (setq next-stage (if (vc-git--empty-db-p) 'ls-files-added 'diff-index))) (`ls-files-added (setq next-stage 'ls-files-unknown) (while (re-search-forward "\\([0-7]\\{6\\}\\) [0-9a-f]\\{40\\} 0\t\\([^\0]+\\)\0" nil t) @@ -390,7 +389,7 @@ or an empty string if none." (push (list name 'added (vc-git-create-extra-fileinfo 0 new-perm)) result)))) (`ls-files-up-to-date - (setq next-stage 'diff-index) + (setq next-stage 'ls-files-unknown) (while (re-search-forward "\\([0-7]\\{6\\}\\) [0-9a-f]\\{40\\} 0\t\\([^\0]+\\)\0" nil t) (let ((perm (string-to-number (match-string 1) 8)) (name (match-string 2))) @@ -409,7 +408,7 @@ or an empty string if none." (vc-git-create-extra-fileinfo 0 0)) result))) (`diff-index - (setq next-stage 'ls-files-unknown) + (setq next-stage (if files 'ls-files-up-to-date 'ls-files-unknown)) (while (re-search-forward ":\\([0-7]\\{6\\}\\) \\([0-7]\\{6\\}\\) [0-9a-f]\\{40\\} [0-9a-f]\\{40\\} \\(\\([ADMUT]\\)\0\\([^\0]+\\)\\|\\([CR]\\)[0-9]*\0\\([^\0]+\\)\0\\([^\0]+\\)\\)\0" nil t 1)