From: Junio C Hamano Date: Sun, 17 Jan 2010 19:15:47 GMT Subject: Re: [PATCH] cvsimport: modernize and standardize external tool calling Message-ID: <7v8wbwzgnw.fsf@alter.siamese.dyndns.org> In-Reply-To: <1263749749-3939-1-git-send-email-bwalton@artsci.utoronto.ca> Ben Walton 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 > Signed-off-by: Ben Walton > --- > 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)/.