path: root/t/
diff options
authorJunio C Hamano <>2013-06-24 18:41:40 (GMT)
committerJunio C Hamano <>2013-06-24 19:49:53 (GMT)
commit84b4202d804c7faec76f3eab22744b6288c63481 (patch)
tree153bb40aa5ef37955e39a70cbb3365576843bc64 /t/
parentf0915cbaf476d63f72c284057680809ed24fbe0d (diff)
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 <>
Diffstat (limited to 't/')
1 files changed, 5 insertions, 0 deletions
diff --git a/t/ b/t/
index 498332c..ac3d0fe 100755
--- a/t/
+++ b/t/
@@ -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