summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-06-24 11:41:40 -0700
committerJunio C Hamano <gitster@pobox.com>2013-06-24 12:49:53 -0700
commit84b4202d804c7faec76f3eab22744b6288c63481 (patch)
tree153bb40aa5ef37955e39a70cbb3365576843bc64 /t
parentf0915cbaf476d63f72c284057680809ed24fbe0d (diff)
downloadgit-84b4202d804c7faec76f3eab22744b6288c63481.tar.gz
status/commit: make sure --porcelain is not affected by user-facing config
The recent addition of status.branch started affecting what is shown when "git status --porcelain" is run by mistake. Identify the configuration items that should be ignored under "--porcelain" option, introduce a "deferred config" mechanism to keep the values read from the configuration, and decide what value to use only after we read both from configuration and command line. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t7508-status.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/t/t7508-status.sh b/t/t7508-status.sh
index 498332ce0a..ac3d0fe445 100755
--- a/t/t7508-status.sh
+++ b/t/t7508-status.sh
@@ -1378,6 +1378,11 @@ test_expect_success '"status.branch=true" weaker than "--no-branch"' '
test_cmp expected_nobranch actual
'
+test_expect_success '"status.branch=true" weaker than "--porcelain"' '
+ git -c status.branch=true status --porcelain >actual &&
+ test_cmp expected_nobranch actual
+'
+
test_expect_success '"status.branch=false" same as "--no-branch"' '
git -c status.branch=false status -s >actual &&
test_cmp expected_nobranch actual