rebase --rebase-merges: root commits can be cousins, too

Reported by Wink Saville: when rebasing with no-rebase-cousins, we
will want to refrain from rebasing all of them, even when they are
root commits.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Johannes Schindelin
2018-05-04 01:01:29 +02:00
committed by Junio C Hamano
parent 9c85a1c29c
commit 8fa6eea0ff
2 changed files with 27 additions and 1 deletions

View File

@ -3903,7 +3903,8 @@ static int make_script_with_merges(struct pretty_print_context *pp,
}
if (!commit)
fprintf(out, "%s onto\n", cmd_reset);
fprintf(out, "%s %s\n", cmd_reset,
rebase_cousins ? "onto" : "[new root]");
else {
const char *to = NULL;