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

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

 



Daniel Barkalow <barkalow@xxxxxxxxxxxx> writes:

> 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).

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