Skip to content

Commit 076a10c

Browse files
Ville SkyttäJunio C Hamano
authored andcommitted
Be nicer if git executable is not installed
This patch avoids problems if vc-git.el is installed and activated, but the git executable is not available, for example http://list-archive.xemacs.org/xemacs-beta/200608/msg00062.html Signed-off-by: Ville Skyttä <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 8e3abd4 commit 076a10c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/emacs/vc-git.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
(let* ((dir (file-name-directory file))
5555
(name (file-relative-name file dir)))
5656
(when dir (cd dir))
57-
(and (eq 0 (call-process "git" nil '(t nil) nil "ls-files" "-c" "-z" "--" name))
57+
(and (ignore-errors (eq 0 (call-process "git" nil '(t nil) nil "ls-files" "-c" "-z" "--" name)))
5858
(let ((str (buffer-string)))
5959
(and (> (length str) (length name))
6060
(string= (substring str 0 (1+ (length name))) (concat name "\0"))))))))

0 commit comments

Comments
 (0)