|
From: | Jim Porter |
Subject: | bug#59491: 29.0.50; [PATCH] Mode-line elements too wide in some VC buffers |
Date: | Wed, 23 Nov 2022 10:43:29 -0800 |
On 11/23/2022 4:14 AM, Eli Zaretskii wrote:
From: Gabriel <gabriel376@hotmail.com> Date: Tue, 22 Nov 2022 17:58:25 -0300 For Git, a better option would be to use a "short revision" (by default the first 7 characters of the "long revision")AFAIR, just taking the first 7 characters is not safe; you need to ask Git. But maybe for this purpose taking 7 would be enough?
It'd be nice to pass this through `git rev-parse --short` or maybe even `git describe --always --all`. vc-git.el could also use something like this when it gets the ref for the modeline (see 'vc-git-mode-line-string' and 'vc-git--symbolic-ref').
In fact, maybe there should be a generic VC function for getting a "friendly" string describing a commit. Then code could use that function in some/most cases instead of showing the full commit ID.
[Prev in Thread] | Current Thread | [Next in Thread] |