From 10331478318c3030b269a1da3361a8a9e3e7e5f1 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 15 Nov 2014 23:48:47 +0100 Subject: [PATCH] Use git rev-parse to get repository version * version.el (emacs-repository-get-version): Use git rev-parse instead of git log. --- lisp/ChangeLog | 5 +++++ lisp/version.el | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d13a62a9b2d..a4bebf2bee8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-11-15 Andreas Schwab + + * version.el (emacs-repository-get-version): Use git rev-parse + instead of git log. + 2014-11-15 Fabián Ezequiel Gallina * progmodes/python.el (python-indent-calculate-levels): Fix diff --git a/lisp/version.el b/lisp/version.el index 1ea38da9cae..cab2d28db4c 100644 --- a/lisp/version.el +++ b/lisp/version.el @@ -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)))))))) -- 2.39.5