summaryrefslogtreecommitdiff
path: root/git-cvsimport-script
diff options
context:
space:
mode:
authorMatthias Urlichs <smurf@kiste.(none)>2005-06-30 20:54:01 (GMT)
committerMatthias Urlichs <smurf@kiste.(none)>2005-06-30 20:54:01 (GMT)
commit2be4fcc345b03910d1a7bf96f640cde4dcacbd6e (patch)
tree0d9e206eaee7059db2fd26ed6a35a16d789f4f16 /git-cvsimport-script
parent4c24e089a33d27e9f15dc746c43a816fabcc060c (diff)
downloadgit-2be4fcc345b03910d1a7bf96f640cde4dcacbd6e.zip
git-2be4fcc345b03910d1a7bf96f640cde4dcacbd6e.tar.gz
git-2be4fcc345b03910d1a7bf96f640cde4dcacbd6e.tar.bz2
cvsimport: Added option '-p': pass options to cvsps
Added option '-x' to cvsps call
Diffstat (limited to 'git-cvsimport-script')
-rwxr-xr-xgit-cvsimport-script9
1 files changed, 6 insertions, 3 deletions
diff --git a/git-cvsimport-script b/git-cvsimport-script
index 1151fb8..7ee8845 100755
--- a/git-cvsimport-script
+++ b/git-cvsimport-script
@@ -26,18 +26,19 @@ use POSIX qw(strftime dup2);
$SIG{'PIPE'}="IGNORE";
$ENV{'TZ'}="UTC";
-our($opt_h,$opt_o,$opt_v,$opt_d);
+our($opt_h,$opt_o,$opt_v,$opt_d,$opt_p);
sub usage() {
print STDERR <<END;
Usage: ${\basename $0} # fetch/update GIT from CVS
[ -o branch-for-HEAD ] [ -h ] [ -v ] [ -d CVSROOT ]
+ [ -p opts-for-cvsps ]
CVS_module [ GIT_repository ]
END
exit(1);
}
-getopts("hqvo:d:") or usage();
+getopts("hqvo:d:p:") or usage();
usage if $opt_h;
@ARGV == 1 or @ARGV == 2 or usage();
@@ -375,7 +376,9 @@ unless(-d $git_dir) {
my $pid = open(CVS,"-|");
die "Cannot fork: $!\n" unless defined $pid;
unless($pid) {
- exec("cvsps","-A","--cvs-direct",$cvs_tree);
+ my @opt;
+ @opt = split(/,/,$opt_p) if defined $opt_p;
+ exec("cvsps",@opt,"-x","-A","--cvs-direct",$cvs_tree);
die "Could not start cvsps: $!\n";
}