git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] t8008: rely on rev-parse'd HEAD instead of sha1 value

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 18, 2017, 19:38 UTC
Message-ID
<xmqqk235o7rm.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CAGZ79kbTQ=eSoDCRFTt_B3kjDbWZDkcPwc3fMvhd8dEKPWr-8A@mail.gmail.com>
Stefan Beller <sbeller@google.com> writes:
Show 17 quoted lines
> On Tue, Jul 18, 2017 at 12:17 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> Stefan Beller <sbeller@google.com> writes:
>>
>>> Remove hard coded sha1 values, obtain the values using 'git rev-parse HEAD'
>>> which should be future proof regardless of the hash function used.
>>
>> Don't hardcoded lengths of the hashes defeat this future-proofing
>> effort, though?  It shouldn't be too hard to do the equivalent of
>> the auto computation of abbreviation in this script, which would be
>> true future-proofing, I guess.
>
> It depends on the definition of future proofing.
> My definition here only included the change of the hash function,
> not the change of display length in git-blame for a small artificial repo
> with 2 commits . These seem to be unrelated, so in case we'd change
> the length of the abbreviated displayed hash, we'd still want to have
> a test to tell us?

The thing is that depending on how these 2 commits hash and share prefixes, the length needed to disambiguate changes.

Previous: Stefan BellerNext: Stefan Beller
Message 4 of 6 in “t8008: rely on rev-parse'd HEAD instead of sha1 value”
  1. t8008: rely on rev-parse'd HEAD instead of sha1 valueStefan Beller, Jul 18, 2017
  2. Junio C HamanoJul 18, 2017
  3. Stefan BellerJul 18, 2017
  4. Junio C HamanoJul 18, 2017
  5. [PATCHv2] t8008: rely on rev-parse'd HEAD instead of sha1 valueStefan Beller, Jul 26, 2017
  6. Junio C HamanoJul 26, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.