git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: (Mosty harmless) protocol error when pushing

From
Björn Gustavsson <bgustavsson@gmail.com>
Date
May 26, 2010, 05:58 UTC
Message-ID
<AANLkTilc9-B79EhmmO2t-VsHFZdupQn8zX9LFYRrn5of@mail.gmail.com>
In-Reply-To
<20100525072824.GA19612@coredump.intra.peff.net>
2010/5/25 Jeff King <peff@peff.net>:
Show 28 quoted lines
> 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
Previous: Jeff KingNext: Ilari Liusvaara
Message 3 of 5 in “(Mosty harmless) protocol error when pushing”
  1. Björn GustavssonMay 25, 2010
  2. Jeff KingMay 25, 2010
  3. Björn GustavssonMay 26, 2010
  4. Ilari LiusvaaraMay 27, 2010
  5. Jeff KingMay 27, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.