Re: [PATCH v3 17/28] Support pushing from a shallow clone
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Nov 26, 2013, 20:38 UTC
- Message-ID
- <CAPig+cSnq8qWusYHYoWRf_n_GaLL_tXTQk5LkLoXuh_WgB00Dg@mail.gmail.com>
- In-Reply-To
- <1385351754-9954-18-git-send-email-pclouds@gmail.com>
On Sun, Nov 24, 2013 at 10:55 PM, Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote:
Show 27 quoted lines
> Pushing from a shallow clone using today's send-pack and receive-pack > may work, if the transferred pack does not end up at any graft > points. If it does, recent receive-pack that does connectivity check > will reject the push. If receive-pack is old and does not have the > connectivity check, the upstream repo becomes corrupt. > > The pack protocol is updated and send-pack now sends all shallow > grafts before it sends the commands, if the repo is shallow. This > protocol extension will break current receive-pack, which is intended, > mostly to stop corrupting the upstream repo. > > Changes on the receiver are similar to what has been done in > fetch-pack, i.e. filter out refs that require new shallow roots then > go along as usual. > > Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> > --- > diff --git a/Documentation/technical/pack-protocol.txt b/Documentation/technical/pack-protocol.txt > index eb8edd1..c73b62f 100644 > --- a/Documentation/technical/pack-protocol.txt > +++ b/Documentation/technical/pack-protocol.txt > @@ -43,6 +43,9 @@ static int fix_thin = 1; > static const char *head_name; > static void *head_name_to_free; > static int sent_capabilities; > +static int shallow_push; > +static const char* alternate_shallow_file;
s/char\* /char */
> +static struct extra_have_objects shallow;
>
> static enum deny_action parse_deny_action(const char *var, const char *value)
> {