Skip to content

Commit 91fe732

Browse files
Ben Waltongitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a12477d commit 91fe732

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

git-cvsimport.perl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -609,9 +609,9 @@ sub munge_user_filename {
609609
my %index; # holds filenames of one index per branch
610610

611611
unless (-d $git_dir) {
612-
system("git init");
612+
system(qw(git init));
613613
die "Cannot init the GIT db at $git_tree: $?\n" if $?;
614-
system("git read-tree");
614+
system(qw(git read-tree));
615615
die "Cannot init an empty tree: $?\n" if $?;
616616

617617
$last_branch = $opt_o;
@@ -993,7 +993,7 @@ sub commit {
993993
}
994994
commit();
995995
if (($commitcount & 1023) == 0) {
996-
system("git repack -a -d");
996+
system(qw(git repack -a -d));
997997
}
998998
$state = 1;
999999
} elsif ($state == 11 and /^-+$/) {
@@ -1017,7 +1017,7 @@ sub commit {
10171017
if ($line =~ /^(\d+) objects, (\d+) kilobytes$/) {
10181018
my ($n_objects, $kb) = ($1, $2);
10191019
1024 < $kb
1020-
and system("git repack -a -d");
1020+
and system(qw(git repack -a -d));
10211021
}
10221022
10231023
foreach my $git_index (values %index) {
@@ -1059,7 +1059,7 @@ sub commit {
10591059
if ($opt_r && $opt_o ne 'HEAD');
10601060
system('git', 'update-ref', 'HEAD', "$orig_branch");
10611061
unless ($opt_i) {
1062-
system('git checkout -f');
1062+
system(qw(git checkout -f));
10631063
die "checkout failed: $?\n" if $?;
10641064
}
10651065
}

0 commit comments

Comments
 (0)