diff options
| author | Dmitry Gutov | 2014-12-15 16:18:34 +0200 |
|---|---|---|
| committer | Dmitry Gutov | 2014-12-15 16:18:34 +0200 |
| commit | 061db139896a6eabebef5bfe199744b6151493f3 (patch) | |
| tree | 70d1ef34b6cd41313c82a9ca682b515fe9d5102d | |
| parent | bb57c94d5f047cde106ffa71bf59f24b2b3027b8 (diff) | |
| download | emacs-061db139896a6eabebef5bfe199744b6151493f3.tar.gz emacs-061db139896a6eabebef5bfe199744b6151493f3.zip | |
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'.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/vc/vc-git.el | 7 |
2 files changed, 8 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 204283ea705..b6bf86809c2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-12-15 Dmitry Gutov <dgutov@yandex.ru> | ||
| 2 | |||
| 3 | * vc/vc-git.el (vc-git-after-dir-status-stage): Move `up-to-date' | ||
| 4 | stage to after `diff-index' (bug#19386). | ||
| 5 | |||
| 1 | 2014-12-14 João Távora <joaotavora@gmail.com> | 6 | 2014-12-14 João Távora <joaotavora@gmail.com> |
| 2 | 7 | ||
| 3 | * textmodes/tex-mode.el (tex-insert-quote): Consider and respect | 8 | * 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." | |||
| 380 | (goto-char (point-min)) | 380 | (goto-char (point-min)) |
| 381 | (pcase stage | 381 | (pcase stage |
| 382 | (`update-index | 382 | (`update-index |
| 383 | (setq next-stage (if (vc-git--empty-db-p) 'ls-files-added | 383 | (setq next-stage (if (vc-git--empty-db-p) 'ls-files-added 'diff-index))) |
| 384 | (if files 'ls-files-up-to-date 'diff-index)))) | ||
| 385 | (`ls-files-added | 384 | (`ls-files-added |
| 386 | (setq next-stage 'ls-files-unknown) | 385 | (setq next-stage 'ls-files-unknown) |
| 387 | (while (re-search-forward "\\([0-7]\\{6\\}\\) [0-9a-f]\\{40\\} 0\t\\([^\0]+\\)\0" nil t) | 386 | (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 | (push (list name 'added (vc-git-create-extra-fileinfo 0 new-perm)) | 389 | (push (list name 'added (vc-git-create-extra-fileinfo 0 new-perm)) |
| 391 | result)))) | 390 | result)))) |
| 392 | (`ls-files-up-to-date | 391 | (`ls-files-up-to-date |
| 393 | (setq next-stage 'diff-index) | 392 | (setq next-stage 'ls-files-unknown) |
| 394 | (while (re-search-forward "\\([0-7]\\{6\\}\\) [0-9a-f]\\{40\\} 0\t\\([^\0]+\\)\0" nil t) | 393 | (while (re-search-forward "\\([0-7]\\{6\\}\\) [0-9a-f]\\{40\\} 0\t\\([^\0]+\\)\0" nil t) |
| 395 | (let ((perm (string-to-number (match-string 1) 8)) | 394 | (let ((perm (string-to-number (match-string 1) 8)) |
| 396 | (name (match-string 2))) | 395 | (name (match-string 2))) |
| @@ -409,7 +408,7 @@ or an empty string if none." | |||
| 409 | (vc-git-create-extra-fileinfo 0 0)) | 408 | (vc-git-create-extra-fileinfo 0 0)) |
| 410 | result))) | 409 | result))) |
| 411 | (`diff-index | 410 | (`diff-index |
| 412 | (setq next-stage 'ls-files-unknown) | 411 | (setq next-stage (if files 'ls-files-up-to-date 'ls-files-unknown)) |
| 413 | (while (re-search-forward | 412 | (while (re-search-forward |
| 414 | ":\\([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" | 413 | ":\\([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" |
| 415 | nil t 1) | 414 | nil t 1) |