Skip to content

Commit 9474a02

Browse files
Martin von Zweigbergkgitster
authored andcommitted
rebase: only show stat if configured to true
If rebase.stat is set to true, a diffstat should be displayed. If it is not set, it should default to false. However, if it is explicitly set to false (or other value), a diffstat is still displayed, which is probably not what most users would expect. Show diffstat only if it is set to true. Signed-off-by: Martin von Zweigbergk <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 593ce2b commit 9474a02

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

git-rebase.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ do_merge=
4848
dotest="$GIT_DIR"/rebase-merge
4949
prec=4
5050
verbose=
51-
diffstat=$(git config --bool rebase.stat)
51+
diffstat=
52+
test "$(git config --bool rebase.stat)" = true && diffstat=t
5253
git_am_opt=
5354
rebase_root=
5455
force_rebase=

0 commit comments

Comments
 (0)