Skip to content

Commit 55d2b6d

Browse files
newrengitster
authored andcommitted
rebase: make sure to pass along the quiet flag to the sequencer
Signed-off-by: Elijah Newren <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 8a997ed commit 55d2b6d

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

builtin/rebase.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ static struct replay_opts get_replay_opts(const struct rebase_options *opts)
120120
replay.allow_empty_message = opts->allow_empty_message;
121121
replay.drop_redundant_commits = (opts->empty == EMPTY_DROP);
122122
replay.keep_redundant_commits = (opts->empty == EMPTY_KEEP);
123+
replay.quiet = !(opts->flags & REBASE_NO_QUIET);
123124
replay.verbose = opts->flags & REBASE_VERBOSE;
124125
replay.reschedule_failed_exec = opts->reschedule_failed_exec;
125126
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)
14761477
N_("allow pre-rebase hook to run")),
14771478
OPT_NEGBIT('q', "quiet", &options.flags,
14781479
N_("be quiet. implies --no-stat"),
1479-
REBASE_NO_QUIET| REBASE_VERBOSE | REBASE_DIFFSTAT),
1480+
REBASE_NO_QUIET | REBASE_VERBOSE | REBASE_DIFFSTAT),
14801481
OPT_BIT('v', "verbose", &options.flags,
14811482
N_("display a diffstat of what changed upstream"),
14821483
REBASE_NO_QUIET | REBASE_VERBOSE | REBASE_DIFFSTAT),

t/t3400-rebase.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,12 +206,18 @@ test_expect_success 'cherry-picked commits and fork-point work together' '
206206
test_cmp expect D
207207
'
208208

209-
test_expect_success 'rebase -q is quiet' '
209+
test_expect_success 'rebase --am -q is quiet' '
210210
git checkout -b quiet topic &&
211211
git rebase -q master >output.out 2>&1 &&
212212
test_must_be_empty output.out
213213
'
214214

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+
215221
test_expect_success 'Rebase a commit that sprinkles CRs in' '
216222
(
217223
echo "One" &&

0 commit comments

Comments
 (0)