Commit 061db139 authored by Dmitry Gutov's avatar Dmitry Gutov

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'.
parent bb57c94d
2014-12-15 Dmitry Gutov <dgutov@yandex.ru>
* 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 <joaotavora@gmail.com> 2014-12-14 João Távora <joaotavora@gmail.com>
* textmodes/tex-mode.el (tex-insert-quote): Consider and respect * textmodes/tex-mode.el (tex-insert-quote): Consider and respect
......
...@@ -380,8 +380,7 @@ or an empty string if none." ...@@ -380,8 +380,7 @@ or an empty string if none."
(goto-char (point-min)) (goto-char (point-min))
(pcase stage (pcase stage
(`update-index (`update-index
(setq next-stage (if (vc-git--empty-db-p) 'ls-files-added (setq next-stage (if (vc-git--empty-db-p) 'ls-files-added 'diff-index)))
(if files 'ls-files-up-to-date 'diff-index))))
(`ls-files-added (`ls-files-added
(setq next-stage 'ls-files-unknown) (setq next-stage 'ls-files-unknown)
(while (re-search-forward "\\([0-7]\\{6\\}\\) [0-9a-f]\\{40\\} 0\t\\([^\0]+\\)\0" nil t) (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." ...@@ -390,7 +389,7 @@ or an empty string if none."
(push (list name 'added (vc-git-create-extra-fileinfo 0 new-perm)) (push (list name 'added (vc-git-create-extra-fileinfo 0 new-perm))
result)))) result))))
(`ls-files-up-to-date (`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) (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)) (let ((perm (string-to-number (match-string 1) 8))
(name (match-string 2))) (name (match-string 2)))
...@@ -409,7 +408,7 @@ or an empty string if none." ...@@ -409,7 +408,7 @@ or an empty string if none."
(vc-git-create-extra-fileinfo 0 0)) (vc-git-create-extra-fileinfo 0 0))
result))) result)))
(`diff-index (`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 (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" ":\\([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) nil t 1)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment