From: Eric Wong Date: Sat, 02 Jul 2016 09:45:04 GMT Subject: Re: [PATCHv2 3/4] push: accept push options Message-ID: <20160702094504.GA7476@dcvr.yhbt.net> In-Reply-To: <20160702002014.29497-4-sbeller@google.com> Stefan Beller 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()");