Re: [PATCHv2 3/4] push: accept push options

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

 



Stefan Beller <sbeller@xxxxxxxxxx> wrote:
> @@ -513,6 +531,17 @@ int send_pack(struct send_pack_args *args,
>  	strbuf_release(&req_buf);
>  	strbuf_release(&cap_buf);
>  
> +	if (use_push_options) {
> +		struct string_list_item *item;
> +		struct strbuf sb = STRBUF_INIT;
> +
> +		for_each_string_list_item(item, args->push_options)
> +			packet_buf_write(&sb, "%s", item->string);
> +			write_or_die(out, sb.buf, sb.len);

write_or_die looks mis-indented.

> +		packet_flush(out);
> +		strbuf_release(&sb);
> +	}
> +
>  	if (use_sideband && cmds_sent) {
>  		memset(&demux, 0, sizeof(demux));
>  		demux.proc = sideband_demux;

> @@ -640,6 +641,7 @@ struct transport *transport_get(struct remote *remote, const char *url)
>  	struct transport *ret = xcalloc(1, sizeof(*ret));
>  
>  	ret->progress = isatty(2);
> +	ret->push_options = NULL;

Seems unnecessary to set NULL, here, xcalloc is right above.

>  	if (!remote)
>  		die("No remote provided to transport_get()");
--
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]