]> git.eshelyaron.com Git - emacs.git/commitdiff
* version.el (emacs-repository-get-version): Avoid error if .git exists but
authorGlenn Morris <rgm@gnu.org>
Wed, 22 Jan 2014 17:34:27 +0000 (09:34 -0800)
committerGlenn Morris <rgm@gnu.org>
Wed, 22 Jan 2014 17:34:27 +0000 (09:34 -0800)
the git executable is not found.

lisp/ChangeLog
lisp/version.el

index 1d957de8ba82e81e29b8c8bddb59abf24e1c8ec1..622da8cf3e8f6a638102d421a90f89ac94ef4bb6 100644 (file)
@@ -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>
 
index d1d6c4c216b0249f22d718db640af6c60d4c1349..1a3265b55b225c4c65e9e0206d3f30710aa4958d 100644 (file)
@@ -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))))))))