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

Re: [PATCH 5/5] Call send-pack with --remote option

From
Junio C Hamano <junkio@cox.net>
Date
Apr 29, 2007, 05:51 UTC
Message-ID
<7vps5ng22u.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.64.0704281304430.28708@iabervon.org>
Daniel Barkalow <barkalow@iabervon.org> writes:
Show 13 quoted lines
> diff --git a/builtin-push.c b/builtin-push.c
> index 2e944cd..d4734be 100644
> --- a/builtin-push.c
> +++ b/builtin-push.c
> @@ -158,7 +158,7 @@ static int do_push(const char *repo)
>  		refspec = remote->push_refspec;
>  	}
>  
> -	argv = xmalloc((refspec_nr + 10) * sizeof(char *));
> +	argv = xmalloc((refspec_nr + 11) * sizeof(char *));
>  	argv[0] = "dummy-send-pack";
>  	argc = 1;
>  	if (all)

I somehow thought this 10 was there not because we counted but we know 10 gives us enough slop. Adding one because we give an extra parameter, while it is logically correct, feels somewhat funny. But I do not have a better suggestion (unless we count exactly which we cannot do).

Previous: Daniel Barkalow
Message 2 of 2 in “Call send-pack with --remote option”
  1. 5/5 Call send-pack with --remote optionDaniel Barkalow, Apr 28, 2007
  2. Junio C HamanoApr 29, 2007

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.