Skip to content

Commit

Permalink
vc-git: Ignore errors caused by a non-existent directory in vc-git-re…
Browse files Browse the repository at this point in the history
…gistered.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Alexandre Julliard authored and Junio C Hamano committed Dec 23, 2006
1 parent 40f656c commit 4de0f9f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions contrib/emacs/vc-git.el
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@
(with-temp-buffer
(let* ((dir (file-name-directory file))
(name (file-relative-name file dir)))
(when dir (cd dir))
(and (ignore-errors (eq 0 (call-process "git" nil '(t nil) nil "ls-files" "-c" "-z" "--" name)))
(and (ignore-errors
(when dir (cd dir))
(eq 0 (call-process "git" nil '(t nil) nil "ls-files" "-c" "-z" "--" name)))
(let ((str (buffer-string)))
(and (> (length str) (length name))
(string= (substring str 0 (1+ (length name))) (concat name "\0"))))))))
Expand Down

0 comments on commit 4de0f9f

Please sign in to comment.