emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-24 061db13: Fix vc-git-dir-status-files WRT up-to-da


From: Dmitry Gutov
Subject: [Emacs-diffs] emacs-24 061db13: Fix vc-git-dir-status-files WRT up-to-date vs edited
Date: Mon, 15 Dec 2014 14:24:45 +0000

branch: emacs-24
commit 061db139896a6eabebef5bfe199744b6151493f3
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    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'.
---
 lisp/ChangeLog    |    5 +++++
 lisp/vc/vc-git.el |    7 +++----
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 204283e..b6bf868 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2014-12-15  Dmitry Gutov  <address@hidden>
+
+       * 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  <address@hidden>
 
        * 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 ae6b13a..4c64d83 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]