Commit e55d0db9 authored by Leo Liu's avatar Leo Liu

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.
parent ca87b349
......@@ -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))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment