rebase: make sure to pass along the quiet flag to the sequencer
Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Elijah Newren committed
Feb 15, 2020 at 21:36 UTC
55d2b6d785da8c49d693d989c22f47622783903a
2 files changed
+9
-2
builtin/rebase.c
+2
-1
@@ -120,6 +120,7 @@ static struct replay_opts get_replay_opts(const struct rebase_options *opts)
120
replay.allow_empty_message = opts->allow_empty_message;
121
replay.drop_redundant_commits = (opts->empty == EMPTY_DROP);
122
replay.keep_redundant_commits = (opts->empty == EMPTY_KEEP);
123
+ replay.quiet = !(opts->flags & REBASE_NO_QUIET);
124
replay.verbose = opts->flags & REBASE_VERBOSE;
125
replay.reschedule_failed_exec = opts->reschedule_failed_exec;
126
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)
1477
N_("allow pre-rebase hook to run")),
1478
OPT_NEGBIT('q', "quiet", &options.flags,
1479
N_("be quiet. implies --no-stat"),
1479
- REBASE_NO_QUIET| REBASE_VERBOSE | REBASE_DIFFSTAT),
1480
+ REBASE_NO_QUIET | REBASE_VERBOSE | REBASE_DIFFSTAT),
1481
OPT_BIT('v', "verbose", &options.flags,
1482
N_("display a diffstat of what changed upstream"),
1483
REBASE_NO_QUIET | REBASE_VERBOSE | REBASE_DIFFSTAT),
t/t3400-rebase.sh
+7
-1
@@ -206,12 +206,18 @@ test_expect_success 'cherry-picked commits and fork-point work together' '
206
test_cmp expect D
207
'
208
209
-test_expect_success 'rebase -q is quiet' '
209
+test_expect_success 'rebase --am -q is quiet' '
210
git checkout -b quiet topic &&
211
git rebase -q master >output.out 2>&1 &&
212
test_must_be_empty output.out
213
'
214
215
+test_expect_success 'rebase --merge -q is quiet' '
216
+ git checkout -B quiet topic &&
217
+ git rebase --merge -q master >output.out 2>&1 &&
218
+ test_must_be_empty output.out
219
+'
220
+
221
test_expect_success 'Rebase a commit that sprinkles CRs in' '
222
(
223
echo "One" &&