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

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

From
EWEric Wong <e@80x24.org>
Date
Jul 2, 2016, 09:45 UTC
Message-ID
<20160702094504.GA7476@dcvr.yhbt.net>
In-Reply-To
<20160702002014.29497-4-sbeller@google.com>
Stefan Beller <sbeller@google.com> wrote:
Show 11 quoted lines
> @@ -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.
Show 7 quoted lines
> +		packet_flush(out);
> +		strbuf_release(&sb);
> +	}
> +
>  	if (use_sideband && cmds_sent) {
>  		memset(&demux, 0, sizeof(demux));
>  		demux.proc = sideband_demux;
Show 5 quoted lines
> @@ -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()");
Previous: Stefan BellerNext: Stefan Beller
Message 4 of 6 in “[RFC PATCHv2 0/4] Push options in C Git”
  1. Stefan BellerJul 2, 2016
  2. 2/4 receive-pack: implement advertising and receiving push optionsStefan Beller, Jul 2, 2016
  3. 3/4 push: accept push optionsStefan Beller, Jul 2, 2016
  4. Eric WongJul 2, 2016
  5. 4/4 add a test for push optionsStefan Beller, Jul 2, 2016
  6. 1/4 push options: {pre,post}-receive hook learns about push optionsStefan Beller, Jul 2, 2016

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.