From: Jonathan Tan <jonathantanmy@google.com>
To: git@vger.kernel.org
Cc: Jonathan Tan <jonathantanmy@google.com>, peff@peff.net
Subject: [PATCH v3 0/2] Last big GIT_TEST_PROTOCOL_VERSION=2 fix, hopefully
Date: Tue, 26 Mar 2019 12:31:19 -0700 [thread overview]
Message-ID: <cover.1553628494.git.jonathantanmy@google.com> (raw)
In-Reply-To: <cover.1553546216.git.jonathantanmy@google.com>
Peff says in [1]:
> But isn't this line:
>
> > + if (version == protocol_v2) {
> > +- if (shallow && shallow->nr)
> > ++ if (shallow->nr)
> > BUG("Protocol V2 does not provide shallows at this point in the fetch");
>
> 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/20190326182047.GB24105@sigill.intra.peff.net/
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,
--
2.21.0.155.ge902e9bcae.dirty
next prev parent reply other threads:[~2019-03-26 19:31 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-25 20:43 [PATCH 0/2] Last big GIT_TEST_PROTOCOL_VERSION=2 fix, hopefully Jonathan Tan
2019-03-25 20:43 ` [PATCH 1/2] fetch-pack: call prepare_shallow_info only if v0 Jonathan Tan
2019-03-26 5:00 ` Jeff King
2019-03-25 20:43 ` [PATCH 2/2] fetch-pack: respect --no-update-shallow in v2 Jonathan Tan
2019-03-26 5:20 ` Jeff King
2019-03-26 10:14 ` Duy Nguyen
2019-03-26 15:18 ` Jeff King
2019-03-26 15:39 ` Duy Nguyen
2019-03-26 17:37 ` Jonathan Tan
2019-03-26 18:18 ` Jeff King
2019-03-26 17:53 ` [PATCH v2 0/2] Last big GIT_TEST_PROTOCOL_VERSION=2 fix, hopefully Jonathan Tan
2019-03-26 17:53 ` [PATCH v2 1/2] fetch-pack: call prepare_shallow_info only if v0 Jonathan Tan
2019-03-26 17:53 ` [PATCH v2 2/2] fetch-pack: respect --no-update-shallow in v2 Jonathan Tan
2019-03-26 18:23 ` Jeff King
2019-03-26 18:20 ` [PATCH v2 0/2] Last big GIT_TEST_PROTOCOL_VERSION=2 fix, hopefully Jeff King
2019-03-26 19:31 ` Jonathan Tan [this message]
2019-03-26 19:31 ` [PATCH v3 1/2] fetch-pack: call prepare_shallow_info only if v0 Jonathan Tan
2019-03-26 19:31 ` [PATCH v3 2/2] fetch-pack: respect --no-update-shallow in v2 Jonathan Tan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1553628494.git.jonathantanmy@google.com \
--to=jonathantanmy@google.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.