Commit 38a62efc authored by Yan Gajdos's avatar Yan Gajdos Committed by Lars Ingebrigtsen
Browse files

Make vc-git-mode-line-string more robust

* lisp/vc/vc-git.el (vc-git-mode-line-string): Make function more
robust (bug#49683).  It could previously error out under certain
conditions, like moving directories in and out of the
VC-controlled tree.

Copyright-paperwork-exempt: yes
parent a98bf3e7
Pipeline #11526 failed with stages
in 49 seconds
......@@ -375,7 +375,7 @@ in the order given by `git status'."
"Return a string for `vc-mode-line' to put in the mode line for FILE."
(let* ((rev (vc-working-revision file 'Git))
(disp-rev (or (vc-git--symbolic-ref file)
(substring rev 0 7)))
(and rev (substring rev 0 7))))
(def-ml (vc-default-mode-line-string 'Git file))
(help-echo (get-text-property 0 'help-echo def-ml))
(face (get-text-property 0 'face def-ml)))
......
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