From 788aac1efeeb3110a1a04b73b2641e695dbdcdc7 Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Tue, 28 Dec 2010 10:30:42 +0100 Subject: [PATCH] rebase: remember verbose option Currently, only interactive rebase remembers the value of the '-v' flag from the initial invocation. Make non-interactive rebase also remember it. Signed-off-by: Martin von Zweigbergk Signed-off-by: Junio C Hamano --- git-rebase--interactive.sh | 2 -- git-rebase.sh | 6 ++++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index a33b2463c..78099320a 100755 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -585,7 +585,6 @@ skip_unnecessary_picks () { get_saved_options () { test -d "$REWRITTEN" && preserve_merges=t test -f "$state_dir"/strategy && strategy="$(cat "$state_dir"/strategy)" - test -f "$state_dir"/verbose && verbose=t test -f "$state_dir"/rebase-root && rebase_root=t } @@ -715,7 +714,6 @@ case "$rebase_root" in : >"$state_dir"/rebase-root ;; esac test -z "$strategy" || echo "$strategy" > "$state_dir"/strategy -test t = "$verbose" && : > "$state_dir"/verbose if test t = "$preserve_merges" then if test -z "$rebase_root" diff --git a/git-rebase.sh b/git-rebase.sh index 95c0d055e..e5be7e5dd 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -76,7 +76,8 @@ read_basic_state () { else orig_head=$(cat "$state_dir"/orig-head) fi && - GIT_QUIET=$(cat "$state_dir"/quiet) + GIT_QUIET=$(cat "$state_dir"/quiet) && + test -f "$state_dir"/verbose && verbose=t } write_basic_state () { @@ -88,7 +89,8 @@ write_basic_state () { else echo "$orig_head" > "$state_dir"/orig-head fi && - echo "$GIT_QUIET" > "$state_dir"/quiet + echo "$GIT_QUIET" > "$state_dir"/quiet && + test t = "$verbose" && : > "$state_dir"/verbose } output () { -- 2.30.2