Re: [PATCH] cvsimport: modernize and standardize external tool calling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ben Walton <bwalton@xxxxxxxxxxxxxxxxxx> 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@xxxxxxxxxxx>
> Signed-off-by: Ben Walton <bwalton@xxxxxxxxxxxxxxxxxx>
> ---
> 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)/.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]