summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8e3abd4)
raw | patch | inline | side by side (parent: 8e3abd4)
author | Ville Skyttä <scop@xemacs.org> | |
Wed, 16 Aug 2006 20:12:26 +0000 (23:12 +0300) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 17 Aug 2006 02:18:27 +0000 (19:18 -0700) |
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>
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>
contrib/emacs/vc-git.el | patch | blob | history |
index 3f6ed699f0848cab6709e736e245b968e963978c..4a8f79092d1217ea6aff51a9cbefef83a4a656ff 100644 (file)
--- a/contrib/emacs/vc-git.el
+++ b/contrib/emacs/vc-git.el
(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"))))))))