unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* vc-git: workaround for "file unregistered" problem
@ 2009-11-12 13:44 David Reitter
  2009-11-12 15:39 ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: David Reitter @ 2009-11-12 13:44 UTC (permalink / raw)
  To: Emacs development discussions

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 <david.reitter@gmail.com>
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))



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-11-12 17:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-12 13:44 vc-git: workaround for "file unregistered" problem David Reitter
2009-11-12 15:39 ` Stefan Monnier
2009-11-12 15:57   ` David Reitter
2009-11-12 17:08     ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).