Skip to content

Commit

Permalink
Be nicer if git executable is not installed
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ville Skyttä authored and Junio C Hamano committed Aug 17, 2006
1 parent 8e3abd4 commit 076a10c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/emacs/vc-git.el
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
(let* ((dir (file-name-directory file))
(name (file-relative-name file dir)))
(when dir (cd dir))
(and (eq 0 (call-process "git" nil '(t nil) nil "ls-files" "-c" "-z" "--" name))
(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))
(string= (substring str 0 (1+ (length name))) (concat name "\0"))))))))
Expand Down

0 comments on commit 076a10c

Please sign in to comment.