GNU bug report logs -
#59257
29.0.50;vc-git-mode-line-string out of range
Previous Next
Reported by: Uwe Brauer <oub <at> mat.ucm.es>
Date: Mon, 14 Nov 2022 23:15:02 UTC
Severity: normal
Merged with 59011
Found in version 29.0.50
Done: Sean Whitton <spwhitton <at> spwhitton.name>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
> Uwe Brauer <oub <at> mat.ucm.es> writes:
> It seems like `vc-git--symbolic-ref' returns nil when it shouldn't?
> I think the attached patch will stop the backtrace from happening, but
> it's more of a workaround:
Thanks, I will test it and report back if you find anything strange.
Since I only use git very occasionally I have no idea
why this error pops up and what it means.
> diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
> index a1ff03144b..ae3cada3d7 100644
> --- a/lisp/vc/vc-git.el
> +++ b/lisp/vc/vc-git.el
> @@ -391,7 +391,7 @@ vc-git-mode-line-string
> "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)
> - (and rev (substring rev 0 7))))
> + (and rev (string-limit rev 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)))
--
Warning: Content may be disturbing to some audiences
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military.
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine.
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/
[smime.p7s (application/pkcs7-signature, attachment)]
This bug report was last modified 151 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.