aboutsummaryrefslogtreecommitdiffstats
path: root/sequencer.h
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2019-07-31 08:18:49 -0700
committerJunio C Hamano <gitster@pobox.com>2019-07-31 12:24:07 -0700
commite1fac531ea9f9dc710f6eeae37ea2b38dd5f9fae (patch)
tree05eb1f6f1698a4d68106a323685e2e265ff037a9 /sequencer.h
parenta63f990d9205d1a781aec310e44edf35e29063a2 (diff)
downloadgit-e1fac531ea9f9dc710f6eeae37ea2b38dd5f9fae.tar.gz
rebase -r: do not (re-)generate root commits with `--root` *and* `--onto`
When rebasing a complete commit history onto a given commit, it is pretty obvious that the root commits should be rebased on top of said given commit. To test this, let's kill two birds with one stone and add a test case to t3427-rebase-subtree.sh that not only demonstrates that this works, but also that `git rebase -r` works with merge strategies now. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sequencer.h')
-rw-r--r--sequencer.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sequencer.h b/sequencer.h
index 0c494b83d4..d506081d3c 100644
--- a/sequencer.h
+++ b/sequencer.h
@@ -142,6 +142,12 @@ int sequencer_remove_state(struct replay_opts *opts);
*/
#define TODO_LIST_REBASE_COUSINS (1U << 4)
#define TODO_LIST_APPEND_TODO_HELP (1U << 5)
+/*
+ * When generating a script that rebases merges with `--root` *and* with
+ * `--onto`, we do not want to re-generate the root commits.
+ */
+#define TODO_LIST_ROOT_WITH_ONTO (1U << 6)
+
int sequencer_make_script(struct repository *r, struct strbuf *out, int argc,
const char **argv, unsigned flags);