Last big GIT_TEST_PROTOCOL_VERSION=2 fix, hopefully
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest2 patches 0 repliesNew
- v22 patches 2 repliesSuperseded
- v12 patches 7 repliesSuperseded
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | fetch-pack: call prepare_shallow_info only if v0commit.h fetch-pack.c | +11 | 0 replies | |
| 2/2 | fetch-pack: respect --no-update-shallow in v2fetch-pack.c | +34 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.
Cover letter [PATCH v3 0/2] Last big GIT_TEST_PROTOCOL_VERSION=2 fix, hopefully
Peff says in [1]:
Quoted 7 lines
But isn't this line:
Quoted 4 lines
+ if (version == protocol_v2) { +- if (shallow && shallow->nr) ++ if (shallow->nr) BUG("Protocol V2 does not provide shallows at this point in the fetch");
Quoted 5 lines
added by patch 1? It's added with "shallow &&" in patch 1, and then modified in patch 2.
I think the "it's never NULL" property is true even before this series, right?
Ah...yes you're right. I've updated it here.
Thanks for your review.
[1] https://public-inbox.org/git/[email protected]/
Jonathan Tan (2):
fetch-pack: call prepare_shallow_info only if v0
fetch-pack: respect --no-update-shallow in v2
commit.h | 4 ++++ fetch-pack.c | 51 +++++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 45 insertions(+), 10 deletions(-)
Range-diff against v2:
1: d2eb101709 ! 1: 64f44a18ad fetch-pack: call prepare_shallow_info only if v0
@@ -38,7 +38,7 @@
- prepare_shallow_info(&si, shallow);
- if (version == protocol_v2)
+ if (version == protocol_v2) {
-+ if (shallow && shallow->nr)
++ if (shallow->nr)
+ BUG("Protocol V2 does not provide shallows at this point in the fetch");
+ memset(&si, 0, sizeof(si));
ref_cpy = do_fetch_pack_v2(args, fd, ref, sought, nr_sought,
2: 943b1cbc61 ! 2: 3f65698610 fetch-pack: respect --no-update-shallow in v2
@@ -120,11 +120,6 @@
fetch_pack_setup();
if (nr_sought)
@@
- die(_("no matching remote head"));
- }
- if (version == protocol_v2) {
-- if (shallow && shallow->nr)
-+ if (shallow->nr)
BUG("Protocol V2 does not provide shallows at this point in the fetch");
memset(&si, 0, sizeof(si));
ref_cpy = do_fetch_pack_v2(args, fd, ref, sought, nr_sought,Signature · 1 line
2.21.0.155.ge902e9bcae.dirty