vc-git: Ignore errors caused by a non-existent directory in vc-git-registered.
Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Alexandre Julliard committed
Dec 22, 2006 at 14:56 UTC
4de0f9f9b6ed1731de00b67952504e5a783f54a4
1 file changed
+3
-2
contrib/emacs/vc-git.el
+3
-2
@@ -58,8 +58,9 @@
58
(with-temp-buffer
59
(let* ((dir (file-name-directory file))
60
(name (file-relative-name file dir)))
61
- (when dir (cd dir))
62
- (and (ignore-errors (eq 0 (call-process "git" nil '(t nil) nil "ls-files" "-c" "-z" "--" name)))
61
+ (and (ignore-errors
62
+ (when dir (cd dir))
63
+ (eq 0 (call-process "git" nil '(t nil) nil "ls-files" "-c" "-z" "--" name)))
64
(let ((str (buffer-string)))
65
(and (> (length str) (length name))
66
(string= (substring str 0 (1+ (length name))) (concat name "\0"))))))))