diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2018-02-23 13:39:54 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-02-23 11:30:52 -0800 |
commit | 5e05825de07c16b810f1b996b7eab3527a95a097 (patch) | |
tree | c3d32126843908408b1357aa77d2c87bc66b1c35 /builtin/merge-recursive.c | |
parent | 67f6905b8ac3468f271866e819232440238f9525 (diff) | |
download | git-js/rebase-recreate-merge.tar.gz |
rebase -i: introduce --recreate-merges=[no-]rebase-cousinsjs/rebase-recreate-merge
This one is a bit tricky to explain, so let's try with a diagram:
C
/ \
A - B - E - F
\ /
D
To illustrate what this new mode is all about, let's consider what
happens upon `git rebase -i --recreate-merges B`, in particular to
the commit `D`. So far, the new branch structure would be:
--- C' --
/ \
A - B ------ E' - F'
\ /
D'
This is not really preserving the branch topology from before! The
reason is that the commit `D` does not have `B` as ancestor, and
therefore it gets rebased onto `B`.
This is unintuitive behavior. Even worse, when recreating branch
structure, most use cases would appear to want cousins *not* to be
rebased onto the new base commit. For example, Git for Windows (the
heaviest user of the Git garden shears, which served as the blueprint
for --recreate-merges) frequently merges branches from `next` early, and
these branches certainly do *not* want to be rebased. In the example
above, the desired outcome would look like this:
--- C' --
/ \
A - B ------ E' - F'
\ /
-- D' --
Let's introduce the term "cousins" for such commits ("D" in the
example), and let's not rebase them by default, introducing the new
"rebase-cousins" mode for use cases where they should be rebased.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/merge-recursive.c')
0 files changed, 0 insertions, 0 deletions