bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#19049: 25.0.50; emacs-repository-get-version doesn't work with git


From: Ulrich Mueller
Subject: bug#19049: 25.0.50; emacs-repository-get-version doesn't work with git
Date: Thu, 13 Nov 2014 23:44:04 +0100

The function tries to determine the version by calling:

   git log -1 --pretty=format:%N

According to git documentation, format:%N will output "commit notes"
which will be empty usually. Presumably, this should be format:%H, in
order to output the commit hash. Patch is included below.


>From bbe5ea6655c85e15ca7a2538f0c12c03b46fed6f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ulrich=20M=C3=BCller?= <ulm@gentoo.org>
Date: Thu, 13 Nov 2014 23:43:23 +0100
Subject: [PATCH] emacs-repository-get-version: Fix git argument.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* version.el (emacs-repository-get-version): Call `git log'
command with proper format argument.

Signed-off-by: Ulrich Müller <ulm@gentoo.org>
---
 lisp/ChangeLog  | 5 +++++
 lisp/version.el | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 5c0ec99..e2276d2 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2014-11-13  Ulrich Müller  <ulm@gentoo.org>
+
+       * version.el (emacs-repository-get-version): Call `git log'
+       command with proper format argument.
+
 2014-11-13  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * net/shr.el (shr-inhibit-images): Add a doc string.
diff --git a/lisp/version.el b/lisp/version.el
index 68b502c..1ea38da 100644
--- a/lisp/version.el
+++ b/lisp/version.el
@@ -188,7 +188,7 @@ only ask the VCS if we cannot find any information 
ourselves."
             (and (eq 0
                      (condition-case nil
                          (call-process "git" nil '(t nil) nil "log"
-                                       "-1" "--pretty=format:%N")
+                                       "-1" "--pretty=format:%H")
                        (error nil)))
                  (not (zerop (buffer-size)))
                  (replace-regexp-in-string "\n" "" (buffer-string))))))))
-- 
2.1.3






reply via email to

[Prev in Thread] Current Thread [Next in Thread]