rebase: handle --strategy via imply_merge() as well
At least after the successive trimming of enum rebase_type mentioned in the previous commit, this code did exactly what imply_merge() does, so just call it instead. Suggested-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
a5b5740bf6
commit
37e80a2471
|
@ -1490,18 +1490,7 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
|
||||||
|
|
||||||
if (options.strategy) {
|
if (options.strategy) {
|
||||||
options.strategy = xstrdup(options.strategy);
|
options.strategy = xstrdup(options.strategy);
|
||||||
switch (options.type) {
|
imply_merge(&options, "--strategy");
|
||||||
case REBASE_APPLY:
|
|
||||||
die(_("--strategy requires --merge or --interactive"));
|
|
||||||
case REBASE_MERGE:
|
|
||||||
/* compatible */
|
|
||||||
break;
|
|
||||||
case REBASE_UNSPECIFIED:
|
|
||||||
options.type = REBASE_MERGE;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
BUG("unhandled rebase type (%d)", options.type);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options.root && !options.onto_name)
|
if (options.root && !options.onto_name)
|
||||||
|
|
Loading…
Reference in New Issue