git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: Git List <git@vger.kernel.org>,
	Michael J Gruber <git@drmicha.warpmail.net>,
	Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 4/7] run-command: add pipe_command helper
Date: Fri, 17 Jun 2016 19:28:58 -0400	[thread overview]
Message-ID: <20160617232857.GA26564@sigill.intra.peff.net> (raw)
In-Reply-To: <CAPig+cR-Z+dpKN0dG_BG7JWRBZeo4Xtpa1HQAU1Tt3WRunsrXg@mail.gmail.com>

On Fri, Jun 17, 2016 at 04:03:18PM -0400, Eric Sunshine wrote:

> > diff --git a/run-command.h b/run-command.h
> > @@ -79,17 +79,34 @@ int run_command_v_opt(const char **argv, int opt);
> >  /**
> > - * Execute the given command, capturing its stdout in the given strbuf.
> > + * Execute the given command, sending "in" to its stdin, and capturing its
> > + * stdout and stderr in the "out" and "err" strbufs. Any of the three may
> > + * be NULL to skip processing.
> > + *
> >   * Returns -1 if starting the command fails or reading fails, and otherwise
> > - * returns the exit code of the command. The output collected in the
> > - * buffer is kept even if the command returns a non-zero exit. The hint field
> > - * gives a starting size for the strbuf allocation.
> > + * returns the exit code of the command. Any output collected in the
> 
> Did you mean s/returns/Returns/ ?

I don't think so. This is a continuatino of "...and otherwise" from the
context line above.

> > + * buffers is kept even if the command returns a non-zero exit. The hint fields
> > + * gives starting sizes for the strbuf allocations.
> >   *
> >   * The fields of "cmd" should be set up as they would for a normal run_command
> > - * invocation. But note that there is no need to set cmd->out; the function
> > - * sets it up for the caller.
> > + * invocation. But note that there is no need to set the in, out, or err
> > + * fields; capture_command handles that automatically.
> 
> s/capture_command/pipe_command/

Whoops, yes.

-Peff

  reply	other threads:[~2016-06-17 23:29 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-16  9:32 [PATCH 0/7] gpg-interface cleanups Jeff King
2016-06-16  9:33 ` [PATCH 1/7] gpg-interface: use child_process.args Jeff King
2016-06-16  9:34 ` [PATCH 2/7] verify_signed_buffer: drop pbuf variable Jeff King
2016-06-16  9:35 ` [PATCH 3/7] verify_signed_buffer: use tempfile object Jeff King
2016-06-16  9:37 ` [PATCH 4/7] run-command: add pipe_command helper Jeff King
2016-06-17 20:03   ` Eric Sunshine
2016-06-17 23:28     ` Jeff King [this message]
2016-06-17 23:31       ` Eric Sunshine
2016-06-16  9:38 ` [PATCH 5/7] verify_signed_buffer: use pipe_command Jeff King
2016-06-16  9:39 ` [PATCH 6/7] sign_buffer: " Jeff King
2016-06-16  9:42 ` [PATCH 7/7] gpg-interface: check gpg signature creation status Jeff King
2016-06-16 18:20 ` [PATCH 0/7] gpg-interface cleanups Junio C Hamano
2016-06-17  9:20   ` Michael J Gruber
2016-06-17  9:21     ` Jeff King
2016-06-17 23:38 ` [PATCH v2 " Jeff King
2016-06-17 23:38   ` [PATCH v2 1/7] gpg-interface: use child_process.args Jeff King
2016-06-17 23:38   ` [PATCH v2 2/7] verify_signed_buffer: drop pbuf variable Jeff King
2016-06-17 23:38   ` [PATCH v2 3/7] verify_signed_buffer: use tempfile object Jeff King
2016-06-17 23:38   ` [PATCH v2 4/7] run-command: add pipe_command helper Jeff King
2016-06-17 23:38   ` [PATCH v2 5/7] verify_signed_buffer: use pipe_command Jeff King
2016-06-17 23:38   ` [PATCH v2 6/7] sign_buffer: " Jeff King
2016-06-17 23:38   ` [PATCH v2 7/7] gpg-interface: check gpg signature creation status Jeff King

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

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

  git send-email \
    --in-reply-to=20160617232857.GA26564@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=sunshine@sunshineco.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.
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 NNTP newsgroup(s).