Commit 1f9974ad authored by Glenn Morris's avatar Glenn Morris

* lisp/version.el (emacs-repository-version-git): Demote errors.

Check result is a hash.
parent 3881af45
......@@ -106,10 +106,11 @@ or if we could not determine the revision.")
(with-temp-buffer
(let ((default-directory (file-name-as-directory dir)))
(and (eq 0
(ignore-errors
(with-demoted-errors "Error running git rev-parse: %S"
(call-process "git" nil '(t nil) nil "rev-parse" "HEAD")))
(not (zerop (buffer-size)))
(replace-regexp-in-string "\n" "" (buffer-string))))))
(progn (goto-char (point-min))
(looking-at "[0-9a-fA-F]\\{40\\}"))
(match-string 0)))))
(defun emacs-repository--version-git-1 (file)
"Internal subroutine of `emacs-repository-get-version'."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment