From: Junio C Hamano <gitster@pobox.com>
To: Ben Walton <bwalton@artsci.utoronto.ca>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] cvsimport: modernize and standardize external tool calling
Date: Sun, 17 Jan 2010 11:15:47 -0800 [thread overview]
Message-ID: <7v8wbwzgnw.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <1263749749-3939-1-git-send-email-bwalton@artsci.utoronto.ca> (Ben Walton's message of "Sun\, 17 Jan 2010 12\:35\:49 -0500")
Ben Walton <bwalton@artsci.utoronto.ca> writes:
> The cvsimport module was mixing old (git-foo) and new (git foo)
> conventions when calling git tools. This patch standardizes the
> calling conventions used in system(), open(), exec() and backticks.
>
> Reported-by: Alexander Maier <amaier@opencsw.org>
> Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
> ---
> This takes into account the feedback from Junio.
Hmph...
> - open(my $fh, '|-', qw(git-update-index -z --index-info))
> - or die "unable to open git-update-index: $!";
> + open(my $fh, '|-', 'git update-index -z --index-info')
> + or die "unable to open git update-index: $!";
I think this change is backwards (and there probably are others).
It used to use a shell-less one-element-per-argument list form to spawn
the process that reads from the pipe, but now you are passing a single
string to be split by the shell.
How about doing this as a two (perhaps three?) patch series instead?
(1) s/git-foo/git foo/ and _nothing else_;
(2) s/open fh, '|-', 'string'/open fh, '|-', qw(string)/ and
s/system 'string'/system qw(string)/.
next prev parent reply other threads:[~2010-01-17 19:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-17 3:55 [PATCH] cvsimport: update to use non-dash git commands Ben Walton
2010-01-17 17:35 ` [PATCH] cvsimport: modernize and standardize external tool calling Ben Walton
2010-01-17 19:15 ` Junio C Hamano [this message]
2010-01-19 19:03 ` [PATCH 1/3] cvsimport: modernize callouts to git subcommands Ben Walton
2010-01-19 19:03 ` [PATCH 2/3] cvsimport: standarize open() calls to external git tools Ben Walton
2010-01-19 19:03 ` [PATCH 3/3] cvsimport: standarize system() " Ben Walton
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=7v8wbwzgnw.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=bwalton@artsci.utoronto.ca \
--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 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).