Re: [PATCH v3 17/28] Support pushing from a shallow clone

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Nov 24, 2013 at 10:55 PM, Nguyễn Thái Ngọc Duy
<pclouds@xxxxxxxxx> wrote:
> 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@xxxxxxxxx>
> ---
> 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)
>  {
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]