Skip to content

Commit 8a997ed

Browse files
newrengitster
authored andcommitted
rebase, sequencer: remove the broken GIT_QUIET handling
The GIT_QUIET environment variable was used to signal the non-am backends that the rebase should perform quietly. The preserve-merges backend does not make use of the quiet flag anywhere (other than to write out its state whenever it writes state), and this mechanism was broken in the conversion from shell to C. Since this environment variable was specifically designed for scripts and the only backend that would still use it is no longer a script, just gut this code. A subsequent commit will fix --quiet for the interactive/merge backend in a different way. Signed-off-by: Elijah Newren <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7db00f0 commit 8a997ed

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

builtin/rebase.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -699,8 +699,8 @@ static int rebase_write_basic_state(struct rebase_options *opts)
699699
opts->onto ? oid_to_hex(&opts->onto->object.oid) : "");
700700
write_file(state_dir_path("orig-head", opts), "%s",
701701
oid_to_hex(&opts->orig_head));
702-
write_file(state_dir_path("quiet", opts), "%s",
703-
opts->flags & REBASE_NO_QUIET ? "" : "t");
702+
if (!(opts->flags & REBASE_NO_QUIET))
703+
write_file(state_dir_path("quiet", opts), "%s", "");
704704
if (opts->flags & REBASE_VERBOSE)
705705
write_file(state_dir_path("verbose", opts), "%s", "");
706706
if (opts->strategy)
@@ -1153,8 +1153,6 @@ static int run_specific_rebase(struct rebase_options *opts, enum action action)
11531153
add_var(&script_snippet, "revisions", opts->revisions);
11541154
add_var(&script_snippet, "restrict_revision", opts->restrict_revision ?
11551155
oid_to_hex(&opts->restrict_revision->object.oid) : NULL);
1156-
add_var(&script_snippet, "GIT_QUIET",
1157-
opts->flags & REBASE_NO_QUIET ? "" : "t");
11581156
sq_quote_argv_pretty(&buf, opts->git_am_opts.argv);
11591157
add_var(&script_snippet, "git_am_opt", buf.buf);
11601158
strbuf_release(&buf);

sequencer.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2570,8 +2570,6 @@ static void write_strategy_opts(struct replay_opts *opts)
25702570
int write_basic_state(struct replay_opts *opts, const char *head_name,
25712571
struct commit *onto, const char *orig_head)
25722572
{
2573-
const char *quiet = getenv("GIT_QUIET");
2574-
25752573
if (head_name)
25762574
write_file(rebase_path_head_name(), "%s\n", head_name);
25772575
if (onto)
@@ -2580,8 +2578,8 @@ int write_basic_state(struct replay_opts *opts, const char *head_name,
25802578
if (orig_head)
25812579
write_file(rebase_path_orig_head(), "%s\n", orig_head);
25822580

2583-
if (quiet)
2584-
write_file(rebase_path_quiet(), "%s\n", quiet);
2581+
if (opts->quiet)
2582+
write_file(rebase_path_quiet(), "%s", "");
25852583
if (opts->verbose)
25862584
write_file(rebase_path_verbose(), "%s", "");
25872585
if (opts->strategy)

0 commit comments

Comments
 (0)