Skip to content

Commit

Permalink
cvsimport: standarize system() calls to external git tools
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ben Walton authored and Junio C Hamano committed Jan 19, 2010
1 parent a12477d commit 91fe732
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions git-cvsimport.perl
Original file line number Diff line number Diff line change
Expand Up @@ -609,9 +609,9 @@ sub munge_user_filename {
my %index; # holds filenames of one index per branch

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

$last_branch = $opt_o;
Expand Down Expand Up @@ -993,7 +993,7 @@ sub commit {
}
commit();
if (($commitcount & 1023) == 0) {
system("git repack -a -d");
system(qw(git repack -a -d));
}
$state = 1;
} elsif ($state == 11 and /^-+$/) {
Expand All @@ -1017,7 +1017,7 @@ sub commit {
if ($line =~ /^(\d+) objects, (\d+) kilobytes$/) {
my ($n_objects, $kb) = ($1, $2);
1024 < $kb
and system("git repack -a -d");
and system(qw(git repack -a -d));
}
foreach my $git_index (values %index) {
Expand Down Expand Up @@ -1059,7 +1059,7 @@ sub commit {
if ($opt_r && $opt_o ne 'HEAD');
system('git', 'update-ref', 'HEAD', "$orig_branch");
unless ($opt_i) {
system('git checkout -f');
system(qw(git checkout -f));
die "checkout failed: $?\n" if $?;
}
}

0 comments on commit 91fe732

Please sign in to comment.