git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] rebase: only show stat if configured to true

From
Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Date
Nov 9, 2010, 20:59 UTC
Message-ID
<1289336340-28337-1-git-send-email-martin.von.zweigbergk@gmail.com>

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 <martin.von.zweigbergk@gmail.com>
---
 git-rebase.sh |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/git-rebase.sh b/git-rebase.sh
index e5df23b..42c0628 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -49,7 +49,8 @@ do_merge=
 dotest="$GIT_DIR"/rebase-merge
 prec=4
 verbose=
-diffstat=$(git config --bool rebase.stat)
+diffstat=
+test "$(git config --bool rebase.stat)" = true && diffstat=t
 git_am_opt=
 rebase_root=
 force_rebase=
-- 
1.7.3.2.167.ga361b
Next: Junio C Hamano
Message 1 of 2 in “rebase: only show stat if configured to true”
  1. rebase: only show stat if configured to trueMartin von Zweigbergk, Nov 9, 2010
  2. Junio C HamanoNov 29, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.