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

Re: Corrupt name-rev output

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 20, 2022, 03:13 UTC
Message-ID
<xmqq4k2otpkb.fsf@gitster.g>
In-Reply-To
<Ylw+M5wwUYKcLM+M@voi.aagh.net>
Thomas Hurst <tom@hur.st> writes:
Show 35 quoted lines
> I've noticed a series of about 20 commits in the HardenedBSD repository
> fairly reliably produce garbage names from git name-rev - usually
> fragments of another commit, sometimes unprintable nonsense.  Sometimes
> it works just fine...
>
> Here's a quick demo showing how to reproduce the problem:
>
> % uname -mrs
> FreeBSD 13.0-RELEASE-p11 amd64
> % git --version
> git version 2.35.2
> % git clone --bare --mirror https://github.com/HardenedBSD/hardenedBSD.git
> % cd hardenedBSD.git
> % git rev-list --branches=\* |
>   git name-rev --stdin --refs=heads/\* |
>   egrep -v '^[0-9a-f]{40}( \([a-zA-Z0-9_/.^~-]+\))?$'
> 3eb67b534cab6a78b44b13e4323fd60353003089 (y:    marcel
> MFC after:      3 days
> Relnotes:       yes
> Sponsored by:   ScaleEngine Inc.
> Differential Revision:  https://reviews.freebsd.org/D3065
> ~3)
> 3ac660fc0c6eb0f876972e7e415c89f1ebed1939 (y:    marcel
> ...
> Passing these commits into name-rev as arguments finds them under
> hardened/current/relro~199^2
>
> git fsck --full does not reveal or fix anything, and the problem also
> persists with a build from source from the next branch.
>
> I was unable to reproduce on an Ubuntu machine with 2.32.0, so I used
> that as a starting point for bisection and landed here:
>
>   3656f842789d25d75da41c6c029470052a573b54
>   name-rev: prefer shorter names over following merges
commit 3656f842789d25d75da41c6c029470052a573b54
Author: Elijah Newren <newren@gmail.com>
Hmph, Elijah, does this ring a bell?
Thanks.
Previous: Thomas HurstNext: Elijah Newren
Message 2 of 8 in “Corrupt name-rev output”
  1. Thomas HurstApr 17, 2022
  2. Junio C HamanoApr 20, 2022
  3. Elijah NewrenApr 21, 2022
  4. René ScharfeApr 21, 2022
  5. René ScharfeApr 22, 2022
  6. Junio C HamanoApr 23, 2022
  7. Ævar Arnfjörð BjarmasonMay 17, 2022
  8. René ScharfeMay 17, 2022

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.