emacs-devel
[Top][All Lists]
Advanced

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

vc-git: workaround for "file unregistered" problem


From: David Reitter
Subject: vc-git: workaround for "file unregistered" problem
Date: Thu, 12 Nov 2009 08:44:53 -0500

I've been having some problems with git:

In some circumstances, git fails to report the status of files and pretends 
they are unregistered.  One symptom can be that vc-git will try to add the file 
a second time.   I have inquired about this on the Git list [1], but received 
no response - I'm not sure if this is a bug in git.  

Either way, specifying full paths works around the problem, and the patch below 
does that for those who encounter similar issues.


[1] http://marc.info/?l=git&m=125787684318129&w=2


commit c1285a8335c943f319d1597c4332707b3291f967
Author: David Reitter <address@hidden>
Date:   Tue Nov 10 13:16:30 2009 -0500

    vc-git-registered: temporary workaround for a git not finding files
    git doesn't understand relative path specs in some situations

diff --git a/lisp/vc-git.el b/lisp/vc-git.el
index cee3abe..3113c19 100644
--- a/lisp/vc-git.el
+++ b/lisp/vc-git.el
@@ -147,7 +147,7 @@ If nil, use the value of `vc-diff-switches'.  If t, use no 
switches."
   (when (vc-git-root file)
     (with-temp-buffer
       (let* (process-file-side-effects
-            (dir (file-name-directory file))
+            (dir (vc-git-root file))
              (name (file-relative-name file dir))
              (str (ignore-errors
                     (when dir (cd dir))



reply via email to

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