aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/git-cvsexportcommit.txt5
-rwxr-xr-xgit-cvsexportcommit.perl6
2 files changed, 7 insertions, 4 deletions
diff --git a/Documentation/git-cvsexportcommit.txt b/Documentation/git-cvsexportcommit.txt
index 347cbcec3..27d531b88 100644
--- a/Documentation/git-cvsexportcommit.txt
+++ b/Documentation/git-cvsexportcommit.txt
@@ -8,7 +8,7 @@ git-cvsexportcommit - Export a single commit to a CVS checkout
SYNOPSIS
--------
-'git-cvsexportcommit' [-h] [-v] [-c] [-p] [-a] [-f] [-m msgprefix] [PARENTCOMMIT] COMMITID
+'git-cvsexportcommit' [-h] [-v] [-c] [-P] [-p] [-a] [-f] [-m msgprefix] [PARENTCOMMIT] COMMITID
DESCRIPTION
@@ -46,6 +46,9 @@ OPTIONS
-f::
Force the merge even if the files are not up to date.
+-P::
+ Force the parent commit, even if it is not a direct parent.
+
-m::
Prepend the commit message with the provided prefix.
Useful for patch series and the like.
diff --git a/git-cvsexportcommit.perl b/git-cvsexportcommit.perl
index 4863c91fe..870554ead 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];