Skip to content

Commit b1977fb

Browse files
committed
rn-117: add article about dumb http bug
1 parent 9de4976 commit b1977fb

File tree

1 file changed

+61
-2
lines changed

1 file changed

+61
-2
lines changed

‎rev_news/drafts/edition-117.md‎

Lines changed: 61 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,68 @@ This edition covers what happened during the months of October and November 2024
2525
### Reviews
2626
-->
2727

28-
<!---
2928
### Support
30-
-->
29+
30+
+[Bug report: v2.47.0 cannot fetch version 1 pack indexes](https://lore.kernel.org/git/[email protected]/)
31+
32+
Someone called 'fox' reported that when upgrading Git to v2.47.0
33+
from v2.46.2 or a previous version, cloning from their website,
34+
which uses the old "dumb HTTP" protocol, stopped working. With
35+
v2.47.0 there is an error message indicating that some index files
36+
"differ in contents".
37+
38+
Using `git bisect` fox found the commit that introduced the
39+
issue. That commit implemented a check that verified that the index
40+
file downloaded from the remote was byte-for-byte identical with the
41+
index file generated locally from the Git objects downloaded as part
42+
of the clone.
43+
44+
That check failed because the remote had an index in the version 1
45+
format, while the locally generated index was in a more recent
46+
format. And fox wondered if this was intentional.
47+
48+
Eric Sunshine replied to fox that he could reproduce the problem.
49+
50+
Jeff King, alias Peff, also replied to fox saying that the breakage
51+
was not intended. He thought that it was better to rely on the
52+
locally generated index, but that there should be no guarantee for
53+
it to be identical to the one downloaded.
54+
55+
Peff proposed a draft patch that discarded the downloaded version
56+
before generating an index, but said it was hacky and didn't check
57+
that the content was the same. So he suggested a better solution.
58+
59+
He then proposed an improved draft patch, which implemented the
60+
better solution he had suggested by marking the downloaded index as
61+
temporary and then discarding it after a new one is generated.
62+
63+
Taylor Blau, who was the temporary Git maintainer while Junio
64+
Hamano, the usual maintainer, had some time off, replied to Eric and
65+
fox in the meantime confirming it was an unintentional breakage, and
66+
saying he was going to look at Peff's patches.
67+
68+
Taylor then discussed with Peff the first draft patch and agreed
69+
with Peff that the solution implemented in the improved draft patch
70+
was better.
71+
72+
So Taylor reviewed Peff's improved draft patch. He made some
73+
comments but found it good, and asked Peff to add a test and to
74+
propose it as a regular patch.
75+
76+
Peff replied to Taylor's comments, proposed a draft test, and said
77+
he was going to work on a proper patch as well as some cleanups and
78+
refactors in the dumb HTTP code.
79+
80+
Taylor found Peff's draft test "beautifully written".
81+
82+
Peff then sent
83+
[a series made of 11 patches](https://lore.kernel.org/git/[email protected]/)
84+
to fix the issue, cleanup the dumb HTTP code and fix a couple of
85+
other bugs or potential bugs he found in the process.
86+
87+
Taylor reviewed the patch series and discussed a few technical
88+
details with Peff. Overall he found the series good to go and
89+
eventually merged it.
3190

3291
<!---
3392
## Developer Spotlight:

0 commit comments

Comments
(0)