{"thread":{"id":"6600","subject":"[PATCH] Allow forcing of a parent commit, even if the parent is not a direct one.","startedAt":"2007-02-01T10:43:39Z","lastAt":"2007-02-01T10:43:39Z","messageCount":1,"participants":["Simon 'corecode' Schubert"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"33223","messageId":"45C1C45B.1000003@fs.ei.tum.de","threadId":"6600","inReplyTo":null,"subject":"[PATCH] Allow forcing of a parent commit, even if the parent is not a direct one.","fromName":"Simon 'corecode' Schubert","fromEmail":"corecode@fs.ei.tum.de","sentAt":"2007-02-01T10:43:39Z","receivedAt":"2007-02-01T10:43:39Z","isPatch":true,"sender":{"key":"corecode@fs.ei.tum.de","avatar":"https://gravatar.com/avatar/eff9dbf0cdac0d1e6a6cd7ed0e50763edcb376b493b5253a35ff167918ad79e1?d=mp&s=160"},"body":"This can be used to compress multiple changesets into one, for example\nlike\n\n\tgit cvsexportcommit -P cvshead mybranch\n\nwithout having to do so in git first.\n\nSigned-off-by: Simon 'corecode' Schubert <corecode@fs.ei.tum.de>\n---\n Documentation/git-cvsexportcommit.txt |    5 ++++-\n git-cvsexportcommit.perl              |    6 +++---\n 2 files changed, 7 insertions(+), 4 deletions(-)\n\ndiff --git a/Documentation/git-cvsexportcommit.txt b/Documentation/git-cvsexportcommit.txt\nindex 347cbce..27d531b 100644\n--- a/Documentation/git-cvsexportcommit.txt\n+++ b/Documentation/git-cvsexportcommit.txt\n@@ -8,7 +8,7 @@ git-cvsexportcommit - Export a single commit to a CVS checkout\n \n SYNOPSIS\n --------\n-'git-cvsexportcommit' [-h] [-v] [-c] [-p] [-a] [-f] [-m msgprefix] [PARENTCOMMIT] COMMITID\n+'git-cvsexportcommit' [-h] [-v] [-c] [-P] [-p] [-a] [-f] [-m msgprefix] [PARENTCOMMIT] COMMITID\n \n \n DESCRIPTION\n@@ -46,6 +46,9 @@ OPTIONS\n -f::\n \tForce the merge even if the files are not up to date.\n \n+-P::\n+\tForce the parent commit, even if it is not a direct parent.\n+\n -m::\n \tPrepend the commit message with the provided prefix. \n \tUseful for patch series and the like.\ndiff --git a/git-cvsexportcommit.perl b/git-cvsexportcommit.perl\nindex 4863c91..870554e 100755\n--- a/git-cvsexportcommit.perl\n+++ b/git-cvsexportcommit.perl\n@@ -15,9 +15,9 @@ unless ($ENV{GIT_DIR} && -r $ENV{GIT_DIR}){\n     die \"GIT_DIR is not defined or is unreadable\";\n }\n \n-our ($opt_h, $opt_p, $opt_v, $opt_c, $opt_f, $opt_a, $opt_m );\n+our ($opt_h, $opt_P, $opt_p, $opt_v, $opt_c, $opt_f, $opt_a, $opt_m );\n \n-getopts('hpvcfam:');\n+getopts('hPpvcfam:');\n \n $opt_h && usage();\n \n@@ -89,7 +89,7 @@ if ($parent) {\n \t    last;\n \t}; # found it\n     }\n-    die \"Did not find $parent in the parents for this commit!\" if !$found;\n+    die \"Did not find $parent in the parents for this commit!\" if !$found and !$opt_P;\n } else { # we don't have a parent from the cmdline...\n     if (@parents == 1) { # it's safe to get it from the commit\n \t$parent = $parents[0];\n-- \n1.5.0.rc2.g544a\n\n\n"}]}