emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/vc-git.el,v


From: Eric S. Raymond
Subject: [Emacs-diffs] Changes to emacs/lisp/vc-git.el,v
Date: Thu, 01 May 2008 19:13:20 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Eric S. Raymond <esr>   08/05/01 19:13:16

Index: vc-git.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/vc-git.el,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -b -r1.55 -r1.56
--- vc-git.el   29 Apr 2008 15:32:56 -0000      1.55
+++ vc-git.el   1 May 2008 19:13:14 -0000       1.56
@@ -156,12 +156,14 @@
 (defun vc-git-state (file)
   "Git-specific version of `vc-state'."
   ;; FIXME: This can't set 'ignored yet
+  (if (not (vc-git-registered file))
+      'unregistered
   (vc-git--call nil "add" "--refresh" "--" (file-relative-name file))
   (let ((diff (vc-git--run-command-string file "diff-index" "-z" "HEAD" "--")))
     (if (and diff (string-match ":[0-7]\\{6\\} [0-7]\\{6\\} [0-9a-f]\\{40\\} 
[0-9a-f]\\{40\\} \\([ADMUT]\\)\0[^\0]+\0"
                                 diff))
         (vc-git--state-code (match-string 1 diff))
-      (if (vc-git--empty-db-p) 'added 'up-to-date))))
+       (if (vc-git--empty-db-p) 'added 'up-to-date)))))
 
 (defun vc-git--ls-files-state (state &rest args)
   "Set state to STATE on all files found with git-ls-files ARGS."




reply via email to

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