]> code.delx.au - gnu-emacs/blobdiff - lisp/version.el
Use git rev-parse to get repository version
[gnu-emacs] / lisp / version.el
index 1ea38da9caefc376c9c51fb6e7dc1be1c2254853..cab2d28db4c196bb87d471eeabc97c16dfade5fa 100644 (file)
@@ -187,8 +187,8 @@ only ask the VCS if we cannot find any information ourselves."
           (let ((default-directory (file-name-as-directory dir)))
             (and (eq 0
                      (condition-case nil
-                         (call-process "git" nil '(t nil) nil "log"
-                                       "-1" "--pretty=format:%H")
+                         (call-process "git" nil '(t nil) nil "rev-parse"
+                                       "HEAD")
                        (error nil)))
                  (not (zerop (buffer-size)))
                  (replace-regexp-in-string "\n" "" (buffer-string))))))))