All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Eric Wong <e@80x24.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/2] Git.pm: use array in command_bidi_pipe example
Date: Mon, 17 Jun 2024 13:33:47 -0700	[thread overview]
Message-ID: <xmqq8qz35mxg.fsf@gitster.g> (raw)
In-Reply-To: <20240617104326.3522535-2-e@80x24.org> (Eric Wong's message of "Mon, 17 Jun 2024 10:43:25 +0000")

Eric Wong <e@80x24.org> writes:

> command_bidi_pipe takes the git command and optional arguments as an
> array, not a string.  Make sure the documentation example is usable
> code.

Makes sense.

>
> Signed-off-by: Eric Wong <e@80x24.org>
> ---
>  perl/Git.pm | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/perl/Git.pm b/perl/Git.pm
> index 03bf570bf4..aebfe0c6e0 100644
> --- a/perl/Git.pm
> +++ b/perl/Git.pm
> @@ -418,7 +418,7 @@ sub command_bidi_pipe {
>  and it is the fourth value returned by C<command_bidi_pipe()>.  The call idiom
>  is:
>  
> -	my ($pid, $in, $out, $ctx) = $r->command_bidi_pipe('cat-file --batch-check');
> +	my ($pid, $in, $out, $ctx) = $r->command_bidi_pipe(qw(cat-file --batch-check));
>  	print $out "000000000\n";
>  	while (<$in>) { ... }
>  	$r->command_close_bidi_pipe($pid, $in, $out, $ctx);
> @@ -431,7 +431,7 @@ sub command_bidi_pipe {
>  calling this function.  This may be useful in a query-response type of
>  commands where caller first writes a query and later reads response, eg:
>  
> -	my ($pid, $in, $out, $ctx) = $r->command_bidi_pipe('cat-file --batch-check');
> +	my ($pid, $in, $out, $ctx) = $r->command_bidi_pipe(qw(cat-file --batch-check));
>  	print $out "000000000\n";
>  	close $out;
>  	while (<$in>) { ... }

  reply	other threads:[~2024-06-17 20:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-17 10:43 [PATCH 0/2] cat-file related doc and test Eric Wong
2024-06-17 10:43 ` [PATCH 1/2] Git.pm: use array in command_bidi_pipe example Eric Wong
2024-06-17 20:33   ` Junio C Hamano [this message]
2024-06-17 10:43 ` [PATCH 2/2] t9700: ensure cat-file info isn't buffered by default Eric Wong
2024-06-17 20:50   ` Junio C Hamano
2024-06-18 21:30     ` [PATCH v2 2/2] t1006: " Eric Wong
2024-06-18 23:37       ` Junio C Hamano
2024-06-19 17:56         ` Eric Wong
2024-06-20 17:28           ` Junio C Hamano
2024-06-21  7:16       ` Jeff King
2024-06-21 20:00         ` Eric Wong
2024-06-24 15:19           ` Jeff King
2024-06-17 23:08   ` [PATCH 2/2] t9700: " Junio C Hamano
2024-06-19  9:08   ` Phillip Wood
2024-06-19 18:08     ` Eric Wong
2024-06-21 13:03       ` Phillip Wood

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=xmqq8qz35mxg.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=e@80x24.org \
    --cc=git@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.