git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Eric Wong <e@80x24.org>
To: Stefan Beller <sbeller@google.com>
Cc: git@vger.kernel.org, peff@peff.net, dwwang@google.com,
	gitster@pobox.com, dennis@kaarsemaker.net
Subject: Re: [PATCHv2 3/4] push: accept push options
Date: Sat, 2 Jul 2016 09:45:04 +0000	[thread overview]
Message-ID: <20160702094504.GA7476@dcvr.yhbt.net> (raw)
In-Reply-To: <20160702002014.29497-4-sbeller@google.com>

Stefan Beller <sbeller@google.com> 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()");

  reply	other threads:[~2016-07-02  9:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-02  0:20 [RFC PATCHv2 0/4] Push options in C Git Stefan Beller
2016-07-02  0:20 ` [PATCHv2 1/4] push options: {pre,post}-receive hook learns about push options Stefan Beller
2016-07-02  0:20 ` [PATCHv2 2/4] receive-pack: implement advertising and receiving " Stefan Beller
2016-07-02  0:20 ` [PATCHv2 3/4] push: accept " Stefan Beller
2016-07-02  9:45   ` Eric Wong [this message]
2016-07-02  0:20 ` [PATCHv2 4/4] add a test for " Stefan Beller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160702094504.GA7476@dcvr.yhbt.net \
    --to=e@80x24.org \
    --cc=dennis@kaarsemaker.net \
    --cc=dwwang@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    --cc=sbeller@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).