GNU bug report logs - #59011
29.0.50; change to vc-git-working-revision breaks vc-git-mode-line-string

Previous Next

Package: emacs;

Reported by: Jonas Bernoulli <jonas <at> bernoul.li>

Date: Fri, 4 Nov 2022 06:55:01 UTC

Severity: normal

Merged with 59257

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

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Jonas Bernoulli <jonas <at> bernoul.li>
Subject: bug#59011: closed (Re: bug#59011: 29.0.50; change to
 vc-git-working-revision breaks vc-git-mode-line-string)
Date: Mon, 10 Mar 2025 07:11:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#59011: 29.0.50; change to vc-git-working-revision breaks vc-git-mode-line-string

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 59011 <at> debbugs.gnu.org.

-- 
59011: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59011
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Sean Whitton <spwhitton <at> spwhitton.name>
To: 59011-done <at> debbugs.gnu.org
Subject: Re: bug#59011: 29.0.50; change to vc-git-working-revision breaks
 vc-git-mode-line-string
Date: Mon, 10 Mar 2025 15:10:11 +0800
Hello,

On Fri 04 Nov 2022 at 04:34pm GMT, Philip Kaludercic wrote:

> This was already touched on in bug#58709, and I believe it is best to
> revert the change for now.

This was done.

-- 
Sean Whitton

[Message part 3 (message/rfc822, inline)]
From: Jonas Bernoulli <jonas <at> bernoul.li>
To: bug-gnu-emacs <at> gnu.org
Cc: Philip Kaludercic <philipk <at> posteo.net>
Subject: 29.0.50; change to vc-git-working-revision breaks
 vc-git-mode-line-string
Date: Fri, 04 Nov 2022 07:53:48 +0100
Since 307ad210040251ea0de2e7f453350c4497bda874 `vc-git-working-revision'
may return the name of a reference (aka symbolic commit) instead of the
full sha1 hash, as it used to always do.

When that name is shorter than seven characters, then that change breaks
`vc-git-mode-line-string', which expects to be able to extract the first
seven characters of the string returned by `vc-git-working-revision'.

(By the way, it is not correct to abbreviate a commit hash to the first
N characters using (substring hash 0 N).  Even in a small repository
there is a risk that such a naive abbreviation is ambiguous.  Instead of
doing that, one should use Git to perform the abbreviation; that way one
can request an abbreviation of a certain length, and Git will comply --
unless doing that would be ambiguous, in which case it returns a longer
abbreviation.)



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.