1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-26 10:49:33 +00:00

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.
This commit is contained in:
Leo Liu 2016-04-27 13:18:04 +08:00
parent ca87b349af
commit e55d0db957

View File

@ -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))