fetch: further ref-prefix cleanups and optimizations
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest9 patches 20 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/9 | t5702: fix typo in test namet/ | +1 | 2 replies | |
| 2/9 | t5516: prefer "oid" to "sha1" in some test titlest/ | +3 | 0 replies | |
| 3/9 | t5516: drop NEEDSWORK about v2 reachability behaviort/ | +0 | 1 reply | |
| 4/9 | t5516: beef up exact-oid ref prefixes testt/ | +4 | 0 replies | |
| 5/9 | refspec_ref_prefixes(): clean up refspec_item logicrefspec.c | +16 | 22 replies | |
| 6/9 | fetch: ask server to advertise HEAD for config-less fetchbuiltin/ t/ | +23 | 4 replies | |
| 7/9 | fetch: stop protecting additions to ref-prefix listbuiltin/ t/ | +18 | 1 reply | |
| 8/9 | fetch: avoid ls-refs only to ask for HEAD symref updatebuiltin/ t/ | +15 | 9 replies | |
| 9/9 | fetch: use ref prefix list to skip ls-refsbuiltin/ | +7 | 0 replies |
Reviews trailers per patch
None of the 9 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Taylor Blau |
|---|---|
| Series | R-b |
| 1/9 | |
| 2/9 | |
| 3/9 | |
| 4/9 | |
| 5/9 | |
| 6/9 | |
| 7/9 | |
| 8/9 | |
| 9/9 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/9] fetch: further ref-prefix cleanups and optimizations
Quoted 9 lines · Taylor Blau
Peff and I talked about this today, and neither of us could find any reasons not to pursue the approach listed in the footnote of
, but this is a more conservative approach that should fix the issue and apply cleanly on top of 'maint'. It may be worth picking this into 2.49, even though we are already quite late into the -rc cycle, this is a fairly nasty bug.
Yeah, I favor doing this simple fix first, and then trying the larger (and slightly riskier) change on top.
I started to write up that larger patch, and found a number of interesting things. ;) So here's a 9-patch series, which would apply on top of tb/fetch-follow-tags-fix (but can very much wait to cook in the next development cycle).
[1/9]: t5702: fix typo in test name
[2/9]: t5516: prefer "oid" to "sha1" in some test titles [3/9]: t5516: drop NEEDSWORK about v2 reachability behavior
Just some cosmetic fixes in nearby areas.
[4/9]: t5516: beef up exact-oid ref prefixes test
Improving test coverage in an area I'm about to touch.
[5/9]: refspec_ref_prefixes(): clean up refspec_item logic
Code clean-up. Not necessary (textually or semantically) for the other patches.
[6/9]: fetch: ask server to advertise HEAD for config-less fetch [7/9]: fetch: stop protecting additions to ref-prefix list [8/9]: fetch: avoid ls-refs only to ask for HEAD symref update
Here we get to the interesting bits. These get rid of the subtle dependency that led to this bug in the first place, and also optimize a few cases where we can narrow the ref advertisement.
The third one is a bit optimization, where we avoid a whole round-trip to the server. It's correct as far as the rest of the code behaves, but I'm not 100% sure that the new origin/HEAD update feature isn't a little buggy. See my comments there.
[9/9]: fetch: use ref prefix list to skip ls-refs
And then this is just a final bit of cleanup enabled by the earlier patches.
builtin/fetch.c | 46 +++++++++++++++++------------------------- refspec.c | 22 ++++++++++++++------ t/t5516-fetch-push.sh | 12 ++++++----- t/t5702-protocol-v2.sh | 44 +++++++++++++++++++++++++++++++++++++++- 4 files changed, 85 insertions(+), 39 deletions(-)
-Peff