Skip to content

Commit 37e80a2

Browse files
ossilatorgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Oswald Buddenhagen <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a5b5740 commit 37e80a2

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

builtin/rebase.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1490,18 +1490,7 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
14901490

14911491
if (options.strategy) {
14921492
options.strategy = xstrdup(options.strategy);
1493-
switch (options.type) {
1494-
case REBASE_APPLY:
1495-
die(_("--strategy requires --merge or --interactive"));
1496-
case REBASE_MERGE:
1497-
/* compatible */
1498-
break;
1499-
case REBASE_UNSPECIFIED:
1500-
options.type = REBASE_MERGE;
1501-
break;
1502-
default:
1503-
BUG("unhandled rebase type (%d)", options.type);
1504-
}
1493+
imply_merge(&options, "--strategy");
15051494
}
15061495

15071496
if (options.root && !options.onto_name)

0 commit comments

Comments
 (0)