]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/rebase.c
rebase: handle --strategy via imply_merge() as well
[thirdparty/git.git] / builtin / rebase.c
index 41853a0b10e4029babb8fb9f7cf46bab894db807..ae360b576a10daebb58073ff040c2ad91057ac4d 100644 (file)
@@ -1490,18 +1490,7 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
 
        if (options.strategy) {
                options.strategy = xstrdup(options.strategy);
-               switch (options.type) {
-               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);
-               }
+               imply_merge(&options, "--strategy");
        }
 
        if (options.root && !options.onto_name)