summaryrefslogtreecommitdiff
path: root/git-cvsexportcommit.perl
diff options
context:
space:
mode:
authorSimon 'corecode' Schubert <corecode@fs.ei.tum.de>2007-02-01 11:43:39 +0100
committerJunio C Hamano <junkio@cox.net>2007-02-05 14:10:01 -0800
commitca28370a3567c14841c594b89fd62449abc166e6 (patch)
tree0b6af18340d906d71f8c85a0ac7abc2ef769417d /git-cvsexportcommit.perl
parent4c55068683ac2e9765ba6e112d2227e50fefae87 (diff)
downloadgit-ca28370a3567c14841c594b89fd62449abc166e6.tar.gz
Allow forcing of a parent commit, even if the parent is not a direct one.
This can be used to compress multiple changesets into one, for example like git cvsexportcommit -P cvshead mybranch without having to do so in git first. Signed-off-by: Simon 'corecode' Schubert <corecode@fs.ei.tum.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-cvsexportcommit.perl')
-rwxr-xr-xgit-cvsexportcommit.perl6
1 files changed, 3 insertions, 3 deletions
diff --git a/git-cvsexportcommit.perl b/git-cvsexportcommit.perl
index 4863c91fe3..870554eade 100755
--- a/git-cvsexportcommit.perl
+++ b/git-cvsexportcommit.perl
@@ -15,9 +15,9 @@ unless ($ENV{GIT_DIR} && -r $ENV{GIT_DIR}){
die "GIT_DIR is not defined or is unreadable";
}
-our ($opt_h, $opt_p, $opt_v, $opt_c, $opt_f, $opt_a, $opt_m );
+our ($opt_h, $opt_P, $opt_p, $opt_v, $opt_c, $opt_f, $opt_a, $opt_m );
-getopts('hpvcfam:');
+getopts('hPpvcfam:');
$opt_h && usage();
@@ -89,7 +89,7 @@ if ($parent) {
last;
}; # found it
}
- die "Did not find $parent in the parents for this commit!" if !$found;
+ die "Did not find $parent in the parents for this commit!" if !$found and !$opt_P;
} else { # we don't have a parent from the cmdline...
if (@parents == 1) { # it's safe to get it from the commit
$parent = $parents[0];