git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Corrupt name-rev output
@ 2022-04-17 16:20 Thomas Hurst
  2022-04-20  3:13 ` Junio C Hamano
  0 siblings, 1 reply; 8+ messages in thread
From: Thomas Hurst @ 2022-04-17 16:20 UTC (permalink / raw)
  To: git

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
MFC after:      3 days
Relnotes:       yes
Sponsored by:   ScaleEngine Inc.
Differential Revision:  https://reviews.freebsd.org/D3065
~4)
<continues>

Here's the result of another run, which includes all the affected
hashes - the name here presumably also has some non-printable garbage
not shown:

3eb67b534cab6a78b44b13e4323fd60353003089 (H~3)
3ac660fc0c6eb0f876972e7e415c89f1ebed1939 (H~4)
888a2df901616fb2900279c75580de3d4bc93278 (H~5)
58b9ad4f2e737ff922ff49ae564a32ee94c0ff6b (H~6)
59181d461b8d8c45144dc1856fa94da8a197b2ee (H~7)
9dd8627f2d53008b73ed93f92b71e24e8e319d93 (H~8)
3e1340e9928c7398551d3192a08acb678defc75e (H~9)
6ed06b88b912202db5b9d28b281ddbf4a1b0652a (H~10)
03b1b642f686502c128ac78ccf9dba7605f2aedf (H~11)
e7861fb764975a2c5f2f558b0800656679959624 (H~12)
4c28d4a51469dbb69bac67ec3b1c3a3d114ddf80 (H~13)
9ad0ed2485e40adce13b3900230640db66a38311 (H~14)
88dbdc409320e2785be4b1fcf0392999e3ab4374 (H~15)
c09997f49b7ca54f8d7305be57a037a294c32780 (H~16)
1f95262a4cda63a14016278f8ccc42c217858c36 (H~17)
50fec7a08d222bfd97499afa1c4000322c2280ff (H~18)
df3a215e38869117f8297e0910e08ae95eea5a59 (H~19)
cc81f4cf69d01cfc329827dbbc44da219bdddc05 (H~20)
5a7f7f242655f04a42e152d2c2f45819e9de4376 (H~21)
39cb585f2d4d4db10a282b06d9f7a9f07b658804 (H~22)
1264cc1d38cb1f1f03e34e395b33011108945638 (H~23)
98883cdf600f4aa3d5aba1d60248000132b6ad58 (H~24)
541df39729d32a70ba4da5184a8e82aaa3c87ae5 (H~25)
288fdc199a6936caab9d89d7deeb9b2bcf3b1f68 (H~26)

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

-- 
Thomas 'Freaky' Hurst
    http://hur.st/

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-05-17 16:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-17 16:20 Corrupt name-rev output Thomas Hurst
2022-04-20  3:13 ` Junio C Hamano
2022-04-21  2:11   ` Elijah Newren
2022-04-21 17:55     ` René Scharfe
2022-04-22 18:44       ` René Scharfe
2022-04-23 16:47         ` Junio C Hamano
2022-05-17 10:15         ` Ævar Arnfjörð Bjarmason
2022-05-17 16:20           ` René Scharfe

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).