From: Leo Liu Date: Wed, 27 Apr 2016 05:18:04 +0000 (+0800) Subject: Fix revision calculation in vc-git-mode-line-string X-Git-Tag: emacs-25.0.94~140 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e55d0db95700edd11e71660729566c67b6c563b3;p=emacs.git 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. --- diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 5d06bf7f357..d5ba0c8be7d 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))