git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fix vc git
@ 2006-12-21 11:25 Duncan Mak
  2006-12-21 11:32 ` Jakub Narebski
  0 siblings, 1 reply; 10+ messages in thread
From: Duncan Mak @ 2006-12-21 11:25 UTC (permalink / raw)
  To: git

Fix vc-git.el to not cd into a non-existent directory.

---

 contrib/emacs/vc-git.el |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

base 54851157acf707eb953eada2a84830897dde5c1d
last 9172c26ece749fc4289eeb89ef45c35936c5a869
diff --git a/contrib/emacs/vc-git.el b/contrib/emacs/vc-git.el
index 8b6361922fd6e6a2fcd9acb20fd54f5b645b36f0..d3ba93325255aea3dc52187dd703d7a8
63cd6e5d 100644
--- a/contrib/emacs/vc-git.el
+++ b/contrib/emacs/vc-git.el
@@ -58,7 +58,7 @@
   (with-temp-buffer
     (let* ((dir (file-name-directory file))
            (name (file-relative-name file dir)))
-      (when dir (cd dir))
+      (if (file-exists-p dir) (cd dir))
       (and (ignore-errors (eq 0 (call-process "git" nil '(t nil) nil "ls-files"
 "-c" "-z" "--" name)))
            (let ((str (buffer-string)))
              (and (> (length str) (length name))
-- 
1.4.4.1

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

end of thread, other threads:[~2006-12-22 15:18 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-21 11:25 [PATCH] fix vc git Duncan Mak
2006-12-21 11:32 ` Jakub Narebski
2006-12-21 11:59   ` Duncan Mak
2006-12-22  0:52     ` Junio C Hamano
2006-12-22  4:11       ` Duncan Mak
2006-12-22  4:54         ` Junio C Hamano
2006-12-22 12:39         ` Alexandre Julliard
2006-12-22 12:51           ` Duncan Mak
2006-12-22 13:56             ` Alexandre Julliard
2006-12-22 15:17               ` Duncan Mak

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 NNTP newsgroup(s).