Skip to content

Commit 7b37a7c

Browse files
Martin von Zweigbergkgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 84df456 commit 7b37a7c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

git-rebase--interactive.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,6 @@ skip_unnecessary_picks () {
585585
get_saved_options () {
586586
test -d "$rewritten" && preserve_merges=t
587587
test -f "$state_dir"/strategy && strategy="$(cat "$state_dir"/strategy)"
588-
test -f "$state_dir"/verbose && verbose=t
589588
test -f "$state_dir"/rebase-root && rebase_root=t
590589
}
591590

@@ -715,7 +714,6 @@ case "$rebase_root" in
715714
: >"$state_dir"/rebase-root ;;
716715
esac
717716
test -z "$strategy" || echo "$strategy" > "$state_dir"/strategy
718-
test t = "$verbose" && : > "$state_dir"/verbose
719717
if test t = "$preserve_merges"
720718
then
721719
if test -z "$rebase_root"

git-rebase.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,16 @@ read_basic_state () {
7979
else
8080
orig_head=$(cat "$state_dir"/head)
8181
fi &&
82-
GIT_QUIET=$(cat "$state_dir"/quiet)
82+
GIT_QUIET=$(cat "$state_dir"/quiet) &&
83+
test -f "$state_dir"/verbose && verbose=t
8384
}
8485

8586
write_basic_state () {
8687
echo "$head_name" > "$state_dir"/head-name &&
8788
echo "$onto" > "$state_dir"/onto &&
8889
echo "$orig_head" > "$state_dir"/orig-head &&
89-
echo "$GIT_QUIET" > "$state_dir"/quiet
90+
echo "$GIT_QUIET" > "$state_dir"/quiet &&
91+
test t = "$verbose" && : > "$state_dir"/verbose
9092
}
9193

9294
output () {

0 commit comments

Comments
 (0)