@matheusbsbs / matheus-bagliano / commits / 076a10c728
Fork 0

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ä <scop@xemacs.org> Signed-off-by: Junio C Hamano <junkio@cox.net>

Ville Skyttä committed Aug 16, 2006 at 23:12 UTC 076a10c7282a08f783a28c1b64d0e114a3fe3d39
1 file changed +1 -1
contrib/emacs/vc-git.el
+1 -1
@@ -54,7 +54,7 @@
54 (let* ((dir (file-name-directory file))
55 (name (file-relative-name file dir)))
56 (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)))
58 (let ((str (buffer-string)))
59 (and (> (length str) (length name))
60 (string= (substring str 0 (1+ (length name))) (concat name "\0"))))))))