aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/git-rebase.txt
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2020-04-27 17:59:49 +0000
committerJunio C Hamano <gitster@pobox.com>2020-04-27 11:51:26 -0700
commita35413c3785bf71e2c018691d6cd5f93638ba9ae (patch)
treeea9e3eff8827e29bfe27c5d7f078d3b9323d6c6c /Documentation/git-rebase.txt
parentaf6b65d45ef179ed52087e80cb089f6b2349f4ec (diff)
downloadgit-a35413c3785bf71e2c018691d6cd5f93638ba9ae.tar.gz
rebase: display an error if --root and --fork-point are both provided
--root implies we want to rebase all commits since the beginning of history. --fork-point means we want to use the reflog of the specified upstream to find the best common ancestor between <upstream> and <branch> and only rebase commits since that common ancestor. These options are clearly contradictory, so throw an error (instead of segfaulting on a NULL pointer) if both are specified. Reported-by: Alexander Berg <alexander.berg@atos.net> Documentation-by: Alban Gruin <alban.gruin@gmail.com> Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-rebase.txt')
-rw-r--r--Documentation/git-rebase.txt7
1 files changed, 5 insertions, 2 deletions
diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
index f7a6033607..fbad356c68 100644
--- a/Documentation/git-rebase.txt
+++ b/Documentation/git-rebase.txt
@@ -414,12 +414,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>::
@@ -600,6 +602,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
-----------------------