summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2014-01-22 09:34:27 -0800
committerGlenn Morris <rgm@gnu.org>2014-01-22 09:34:27 -0800
commit983664c0b46b7b4f93e11dcbb0ebed7d000d2430 (patch)
treeb7a8c71cb4c5492f2e11addfb8c11540250d5ee5 /lisp
parent2a5bce4f0c0bdb7e07385d1d6e03232224b1e466 (diff)
downloademacs-983664c0b46b7b4f93e11dcbb0ebed7d000d2430.tar.gz
* version.el (emacs-repository-get-version): Avoid error if .git exists but
the git executable is not found.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog1
-rw-r--r--lisp/version.el6
2 files changed, 5 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1d957de8ba8..622da8cf3e8 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -4,6 +4,7 @@
Check either .bzr or .git, but not both.
Make the git case actually use the DIR argument, and return nil
rather than the empty string.
+ Avoid error if .git exists but the git executable is not found.
2014-01-22 Martin Rudalics <rudalics@gmx.at>
diff --git a/lisp/version.el b/lisp/version.el
index d1d6c4c216b..1a3265b55b2 100644
--- a/lisp/version.el
+++ b/lisp/version.el
@@ -185,8 +185,10 @@ only ask the VCS if we cannot find any information ourselves."
(message "Waiting for git...")
(with-temp-buffer
(let ((default-directory (file-name-as-directory dir)))
- (and (zerop (call-process "git" nil '(t nil) nil "log"
- "-1" "--pretty=format:%N"))
+ (and (eq 0
+ (ignore-errors
+ (call-process "git" nil '(t nil) nil "log"
+ "-1" "--pretty=format:%N")))
(not (zerop (buffer-size)))
(replace-regexp-in-string "\n" "" (buffer-string))))))))