]> git.ipfire.org Git - thirdparty/git.git/commitdiff
rebase: make sure to pass along the quiet flag to the sequencer
authorElijah Newren <newren@gmail.com>
Sat, 15 Feb 2020 21:36:28 +0000 (21:36 +0000)
committerJunio C Hamano <gitster@pobox.com>
Sun, 16 Feb 2020 23:40:42 +0000 (15:40 -0800)
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/rebase.c
t/t3400-rebase.sh

index 7551f950593a34f7968b73cc1026f9b979b54ef6..1a664137d29d5dab359cadfd1b0d422677313fe6 100644 (file)
@@ -120,6 +120,7 @@ static struct replay_opts get_replay_opts(const struct rebase_options *opts)
        replay.allow_empty_message = opts->allow_empty_message;
        replay.drop_redundant_commits = (opts->empty == EMPTY_DROP);
        replay.keep_redundant_commits = (opts->empty == EMPTY_KEEP);
+       replay.quiet = !(opts->flags & REBASE_NO_QUIET);
        replay.verbose = opts->flags & REBASE_VERBOSE;
        replay.reschedule_failed_exec = opts->reschedule_failed_exec;
        replay.gpg_sign = xstrdup_or_null(opts->gpg_sign_opt);
@@ -1476,7 +1477,7 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
                         N_("allow pre-rebase hook to run")),
                OPT_NEGBIT('q', "quiet", &options.flags,
                           N_("be quiet. implies --no-stat"),
-                          REBASE_NO_QUIET| REBASE_VERBOSE | REBASE_DIFFSTAT),
+                          REBASE_NO_QUIET | REBASE_VERBOSE | REBASE_DIFFSTAT),
                OPT_BIT('v', "verbose", &options.flags,
                        N_("display a diffstat of what changed upstream"),
                        REBASE_NO_QUIET | REBASE_VERBOSE | REBASE_DIFFSTAT),
index 221b35f2df30846960f74e8cb4d8539f228d6a5f..79762b989a4457ab3b63735672270b76f96b8f11 100755 (executable)
@@ -206,12 +206,18 @@ test_expect_success 'cherry-picked commits and fork-point work together' '
        test_cmp expect D
 '
 
-test_expect_success 'rebase -q is quiet' '
+test_expect_success 'rebase --am -q is quiet' '
        git checkout -b quiet topic &&
        git rebase -q master >output.out 2>&1 &&
        test_must_be_empty output.out
 '
 
+test_expect_success 'rebase --merge -q is quiet' '
+       git checkout -B quiet topic &&
+       git rebase --merge -q master >output.out 2>&1 &&
+       test_must_be_empty output.out
+'
+
 test_expect_success 'Rebase a commit that sprinkles CRs in' '
        (
                echo "One" &&