emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs-25 e55d0db: Fix revision calculation in vc-git-mode-


From: Leo Liu
Subject: [Emacs-diffs] emacs-25 e55d0db: Fix revision calculation in vc-git-mode-line-string
Date: Wed, 27 Apr 2016 05:19:35 +0000

branch: emacs-25
commit e55d0db95700edd11e71660729566c67b6c563b3
Author: Leo Liu <address@hidden>
Commit: Leo Liu <address@hidden>

    Fix revision calculation in vc-git-mode-line-string
    
    * lisp/vc/vc-git.el (vc-git-mode-line-string): Use
      vc-git-working-revision because vc-working-revision needs to decide
      the backend and may return nil.
---
 lisp/vc/vc-git.el |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index 5d06bf7..d5ba0c8 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -278,7 +278,7 @@ Should be consistent with the Git config value 
i18n.logOutputEncoding."
 
 (defun vc-git-mode-line-string (file)
   "Return a string for `vc-mode-line' to put in the mode line for FILE."
-  (let* ((rev (vc-working-revision file))
+  (let* ((rev (vc-git-working-revision file))
          (disp-rev (or (vc-git--symbolic-ref file)
                        (substring rev 0 7)))
          (def-ml (vc-default-mode-line-string 'Git file))



reply via email to

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