Subject: Re: bug#14459: git vc-annotate fails in detached HEAD state
From: Dmitry Gutov <[email-masked]>
To: Stefan Monnier <[email-masked]>
Cc: [email-masked]
Date: Tue, 28 May 2013 03:14:04 +0400
List-Id: <debbugs-submit.debbugs.gnu.org>

Version: 24.4

Claudio Bley <[email-masked]> writes:
> Yes, this is way better than what I've come up with. But shouldn't we
> also use the "--short[=n]" option to restrict the length of the
> revision string as it is displayed in the modeline? I think 40 chars
> is a bit long a text taking up precious space in my modeline.

Thanks, I missed that. And also the fact that
`vc-git-mode-line-string' relied on the non-standard return value (empty
string) to determine whether it should add the appropriate help-echo,
("No current branch (detached HEAD)").

I've checked in a more comprehensive patch, using the same help-echo
format in both cases.

Stefan Monnier <[email-masked]> writes:
> The shortening could also be limited to the modeline.

Done. Shortening the mode-line format in `vc-git-mode-line-string'
wasn't an obvious solution for me, but it seems to work well enough.