@@ -1878,6 +1878,17 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
1878
1878
if (isatty (2 ) && options .flags & REBASE_NO_QUIET )
1879
1879
strbuf_addstr (& options .git_format_patch_opt , " --progress" );
1880
1880
1881
+ if (options .git_am_opts .argc ) {
1882
+ /* all am options except -q are compatible only with --am */
1883
+ for (i = options .git_am_opts .argc - 1 ; i >= 0 ; i -- )
1884
+ if (strcmp (options .git_am_opts .argv [i ], "-q" ))
1885
+ break ;
1886
+
1887
+ if (is_interactive (& options ) && i >= 0 )
1888
+ die (_ ("cannot combine am options with either "
1889
+ "interactive or merge options" ));
1890
+ }
1891
+
1881
1892
switch (options .type ) {
1882
1893
case REBASE_MERGE :
1883
1894
case REBASE_INTERACTIVE :
@@ -1908,17 +1919,6 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
1908
1919
if (reschedule_failed_exec >= 0 )
1909
1920
options .reschedule_failed_exec = reschedule_failed_exec ;
1910
1921
1911
- if (options .git_am_opts .argc ) {
1912
- /* all am options except -q are compatible only with --am */
1913
- for (i = options .git_am_opts .argc - 1 ; i >= 0 ; i -- )
1914
- if (strcmp (options .git_am_opts .argv [i ], "-q" ))
1915
- break ;
1916
-
1917
- if (is_interactive (& options ) && i >= 0 )
1918
- die (_ ("cannot combine am options with either "
1919
- "interactive or merge options" ));
1920
- }
1921
-
1922
1922
if (options .signoff ) {
1923
1923
if (options .type == REBASE_PRESERVE_MERGES )
1924
1924
die ("cannot combine '--signoff' with "
0 commit comments