diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2018-04-25 14:29:03 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-04-26 05:28:42 +0200 |
commit | 1644c73c6d4fe35d4d3304b9c03c9586de51626f (patch) | |
tree | 224c2f2f07c0d7108199ac2500f02fd92d126dc5 /sequencer.h | |
parent | sequencer: fast-forward `merge` commands, if possible (diff) | |
download | git-1644c73c6d4fe35d4d3304b9c03c9586de51626f.tar.xz git-1644c73c6d4fe35d4d3304b9c03c9586de51626f.zip |
rebase-helper --make-script: introduce a flag to rebase merges
The sequencer just learned new commands intended to recreate branch
structure (similar in spirit to --preserve-merges, but with a
substantially less-broken design).
Let's allow the rebase--helper to generate todo lists making use of
these commands, triggered by the new --rebase-merges option. For a
commit topology like this (where the HEAD points to C):
- A - B - C
\ /
D
the generated todo list would look like this:
# branch D
pick 0123 A
label branch-point
pick 1234 D
label D
reset branch-point
pick 2345 B
merge -C 3456 D # C
To keep things simple, we first only implement support for merge commits
with exactly two parents, leaving support for octopus merges to a later
patch series.
All merge-rebasing todo lists start with a hard-coded `label onto` line.
This makes it convenient to refer later on to the revision onto which
everything is rebased, e.g. as starting point for branches other than
the very first one.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to '')
-rw-r--r-- | sequencer.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sequencer.h b/sequencer.h index e45b178dfc..6bc4da1724 100644 --- a/sequencer.h +++ b/sequencer.h @@ -59,6 +59,7 @@ int sequencer_remove_state(struct replay_opts *opts); #define TODO_LIST_KEEP_EMPTY (1U << 0) #define TODO_LIST_SHORTEN_IDS (1U << 1) #define TODO_LIST_ABBREVIATE_CMDS (1U << 2) +#define TODO_LIST_REBASE_MERGES (1U << 3) int sequencer_make_script(FILE *out, int argc, const char **argv, unsigned flags); |