cvsimport: standarize system() calls to external git tools
This patch standardizes calls to system() where external git tools are called. Instead of system("git foo ... "), use system(qw(git foo ...)). All calls are made without the use of an 'sh -c' process to split the arguments. Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ben Walton committed
Jan 19, 2010 at 14:03 UTC
91fe7324c5a5a11a7fff4993ce5ded81b6e3ee08
1 file changed
+5
-5
git-cvsimport.perl
+5
-5
@@ -609,9 +609,9 @@ $orig_git_index = $ENV{GIT_INDEX_FILE} if exists $ENV{GIT_INDEX_FILE};
609
my %index; # holds filenames of one index per branch
610
611
unless (-d $git_dir) {
612
- system("git init");
612
+ system(qw(git init));
613
die "Cannot init the GIT db at $git_tree: $?\n" if $?;
614
- system("git read-tree");
614
+ system(qw(git read-tree));
615
die "Cannot init an empty tree: $?\n" if $?;
616
617
$last_branch = $opt_o;
@@ -993,7 +993,7 @@ while (<CVS>) {
993
}
994
commit();
995
if (($commitcount & 1023) == 0) {
996
- system("git repack -a -d");
996
+ system(qw(git repack -a -d));
997
}
998
$state = 1;
999
} elsif ($state == 11 and /^-+$/) {
@@ -1017,7 +1017,7 @@ my $line = `git count-objects`;
1017
if ($line =~ /^(\d+) objects, (\d+) kilobytes$/) {
1018
my ($n_objects, $kb) = ($1, $2);
1019
1024 < $kb
1020
- and system("git repack -a -d");
1020
+ and system(qw(git repack -a -d));
1021
}
1022
1023
foreach my $git_index (values %index) {
@@ -1059,7 +1059,7 @@ if ($orig_branch) {
1059
if ($opt_r && $opt_o ne 'HEAD');
1060
system('git', 'update-ref', 'HEAD', "$orig_branch");
1061
unless ($opt_i) {
1062
- system('git checkout -f');
1062
+ system(qw(git checkout -f));
1063
die "checkout failed: $?\n" if $?;
1064
}
1065
}