From 899b49c446fa645419676899c9409e2975a5dd26 Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Tue, 11 Dec 2018 08:11:36 -0800 Subject: git-rebase, sequencer: extend --quiet option for the interactive machinery While 'quiet' and 'interactive' may sound like antonyms, the interactive machinery actually has logic that implements several interactive_rebase=implied cases (--exec, --keep-empty, --rebase-merges) which won't pop up an editor. The rewrite of interactive rebase in C added a quiet option, though it only turns stats off. Since we want to make the interactive machinery also take over for git-rebase--merge, it should fully implement the --quiet option. git-rebase--interactive was already somewhat quieter than git-rebase--merge and git-rebase--am, possibly because cherry-pick has just traditionally been quieter. As such, we only drop a few informational messages -- "Rebasing (n/m)" and "Successfully rebased..." Also, for simplicity, remove the differences in how quiet and verbose options were recorded. Having one be signalled by the presence of a "verbose" file in the state_dir, while the other was signalled by the contents of a "quiet" file was just weirdly inconsistent. (This inconsistency pre-dated the rewrite into C.) Make them consistent by having them both key off the presence of the file. Signed-off-by: Elijah Newren Signed-off-by: Junio C Hamano --- git-rebase--common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git-rebase--common.sh') diff --git a/git-rebase--common.sh b/git-rebase--common.sh index 7e39d22871..dc18c682fa 100644 --- a/git-rebase--common.sh +++ b/git-rebase--common.sh @@ -10,7 +10,7 @@ write_basic_state () { echo "$head_name" > "$state_dir"/head-name && echo "$onto" > "$state_dir"/onto && echo "$orig_head" > "$state_dir"/orig-head && - echo "$GIT_QUIET" > "$state_dir"/quiet && + test t = "$GIT_QUIET" && : > "$state_dir"/quiet test t = "$verbose" && : > "$state_dir"/verbose test -n "$strategy" && echo "$strategy" > "$state_dir"/strategy test -n "$strategy_opts" && echo "$strategy_opts" > \ -- cgit v1.2.3