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:
parent
ca87b349af
commit
e55d0db957
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user