Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/git-rebase.txt7
-rw-r--r--builtin/rebase.c3
2 files changed, 8 insertions, 2 deletions
diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
index c70c1ec5e0..794f2f39f1 100644
--- a/Documentation/git-rebase.txt
+++ b/Documentation/git-rebase.txt
@@ -449,12 +449,14 @@ When --fork-point is active, 'fork_point' will be used instead of
<branch>` command (see linkgit:git-merge-base[1]). If 'fork_point'
ends up being empty, the <upstream> will be used as a fallback.
+
-If either <upstream> or --root is given on the command line, then the
-default is `--no-fork-point`, otherwise the default is `--fork-point`.
+If <upstream> is given on the command line, then the default is
+`--no-fork-point`, otherwise the default is `--fork-point`.
+
If your branch was based on <upstream> but <upstream> was rewound and
your branch contains commits which were dropped, this option can be used
with `--keep-base` in order to drop those commits from your branch.
++
+See also INCOMPATIBLE OPTIONS below.
--ignore-whitespace::
--whitespace=<option>::
@@ -636,6 +638,7 @@ In addition, the following pairs of options are incompatible:
* --preserve-merges and --empty=
* --keep-base and --onto
* --keep-base and --root
+ * --fork-point and --root
BEHAVIORAL DIFFERENCES
-----------------------
diff --git a/builtin/rebase.c b/builtin/rebase.c
index 1c0a49c642..8cbfc5106e 100644
--- a/builtin/rebase.c
+++ b/builtin/rebase.c
@@ -1481,6 +1481,9 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
die(_("cannot combine '--keep-base' with '--root'"));
}
+ if (options.root && fork_point > 0)
+ die(_("cannot combine '--root' with '--fork-point'"));
+
if (action != ACTION_NONE && !in_progress)
die(_("No rebase in progress?"));
setenv(GIT_REFLOG_ACTION_ENVIRONMENT, "rebase", 0);