aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2015-06-14 16:33:05 -0700
committerGlenn Morris2015-06-14 16:33:05 -0700
commit1f9974ad837b0ae3967dd126789ee7f7b04da8f9 (patch)
tree5a5e3222ff07483066b21d5e45329ff5d11fccc8
parent3881af45bf104f54a851dc84becd0a6f744839c3 (diff)
downloademacs-1f9974ad837b0ae3967dd126789ee7f7b04da8f9.tar.gz
emacs-1f9974ad837b0ae3967dd126789ee7f7b04da8f9.zip
* lisp/version.el (emacs-repository-version-git): Demote errors.
Check result is a hash.
-rw-r--r--lisp/version.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/version.el b/lisp/version.el
index 112611d1083..c0b975ed31b 100644
--- a/lisp/version.el
+++ b/lisp/version.el
@@ -106,10 +106,11 @@ or if we could not determine the revision.")
106 (with-temp-buffer 106 (with-temp-buffer
107 (let ((default-directory (file-name-as-directory dir))) 107 (let ((default-directory (file-name-as-directory dir)))
108 (and (eq 0 108 (and (eq 0
109 (ignore-errors 109 (with-demoted-errors "Error running git rev-parse: %S"
110 (call-process "git" nil '(t nil) nil "rev-parse" "HEAD"))) 110 (call-process "git" nil '(t nil) nil "rev-parse" "HEAD")))
111 (not (zerop (buffer-size))) 111 (progn (goto-char (point-min))
112 (replace-regexp-in-string "\n" "" (buffer-string)))))) 112 (looking-at "[0-9a-fA-F]\\{40\\}"))
113 (match-string 0)))))
113 114
114(defun emacs-repository--version-git-1 (file) 115(defun emacs-repository--version-git-1 (file)
115 "Internal subroutine of `emacs-repository-get-version'." 116 "Internal subroutine of `emacs-repository-get-version'."