Re: (Mosty harmless) protocol error when pushing

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

 



2010/5/25 Jeff King <peff@xxxxxxxx>:

> diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
> index bb34757..c0a6a3b 100644
> --- a/builtin/receive-pack.c
> +++ b/builtin/receive-pack.c
> @@ -843,7 +843,20 @@ int cmd_receive_pack(int argc, const char **argv, const char *prefix)
>                        const char *argv_gc_auto[] = {
>                                "gc", "--auto", "--quiet", NULL,
>                        };
> -                       run_command_v_opt(argv_gc_auto, RUN_GIT_CMD);
> +                       struct child_process proc;
> +
> +                       memset(&proc, 0, sizeof(proc));
> +                       proc.no_stdin = 1;
> +                       proc.stdout_to_stderr = 1;
> +                       proc.err = use_sideband ? -1 : 0;
> +                       proc.git_cmd = 1;
> +                       proc.argv = argv_gc_auto;
> +
> +                       if (!start_command(&proc)) {
> +                               if (use_sideband)
> +                                       copy_to_sideband(proc.err, -1, NULL);
> +                               finish_command(&proc);
> +                       }
>                }
>                if (auto_update_server_info)
>                        update_server_info(0);
>
> Unfortunately I can't actually test it. :)

Thanks!

Unfortunately, I was also unable to reproduce the problem,
so I can't test it either.

There is no easy way to force a GC on my repository at github,
so I tried to push to a local repository having too many loose
objects using the "file:" protocol but the problem did not occur
(i.e. the repository was auto packed but the protocol error did
not happen).

-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB
��.n��������+%������w��{.n��������n�r������&��z�ޗ�zf���h���~����������_��+v���)ߣ�

[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]