]> code.delx.au - gnu-emacs/commitdiff
Use git rev-parse to get repository version
authorAndreas Schwab <schwab@linux-m68k.org>
Sat, 15 Nov 2014 22:48:47 +0000 (23:48 +0100)
committerAndreas Schwab <schwab@linux-m68k.org>
Sat, 15 Nov 2014 23:27:58 +0000 (00:27 +0100)
* version.el (emacs-repository-get-version): Use git rev-parse
instead of git log.

lisp/ChangeLog
lisp/version.el

index d13a62a9b2d13577df5d5e7a281d4959ef382b1a..a4bebf2bee823e7dcb23b42c01bec338a35615a4 100644 (file)
@@ -1,3 +1,8 @@
+2014-11-15  Andreas Schwab  <schwab@linux-m68k.org>
+
+       * version.el (emacs-repository-get-version): Use git rev-parse
+       instead of git log.
+
 2014-11-15  Fabián Ezequiel Gallina  <fgallina@gnu.org>
 
        * progmodes/python.el (python-indent-calculate-levels): Fix
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))))))))