aboutsummaryrefslogtreecommitdiffstats
path: root/t/t0210-trace2-normal.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-01-29 14:05:10 -0800
committerJunio C Hamano <gitster@pobox.com>2025-01-29 14:05:10 -0800
commitc5216a1bc68745ee81ba869adc6052ed892ebac1 (patch)
treebf56d6d15560576dddb2aa4f1022ca2f379be751 /t/t0210-trace2-normal.sh
parentd205f06ae07928b0c8b74930d76927a7e9b04781 (diff)
parent2fd367cf63cd5f94368340cc6fe1cd0a3fb021df (diff)
downloadgit-c5216a1bc68745ee81ba869adc6052ed892ebac1.tar.gz
Merge branch 'am/trace2-with-valueless-true'
The trace2 code was not prepared to show a configuration variable that is set to true using the valueless true syntax, which has been corrected. * am/trace2-with-valueless-true: trace2: prevent segfault on config collection with valueless true
Diffstat (limited to 't/t0210-trace2-normal.sh')
-rwxr-xr-xt/t0210-trace2-normal.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t0210-trace2-normal.sh b/t/t0210-trace2-normal.sh
index eff9a59dbd..4287ed3fbb 100755
--- a/t/t0210-trace2-normal.sh
+++ b/t/t0210-trace2-normal.sh
@@ -243,6 +243,15 @@ test_expect_success 'bug messages followed by BUG() are written to trace2' '
test_cmp expect actual
'
+test_expect_success 'a valueless true configuration variable is handled' '
+ test_when_finished "rm -f trace2.normal actual expect" &&
+ echo >expect &&
+ GIT_TRACE2="$(pwd)/trace2.normal" \
+ GIT_TRACE2_CONFIG_PARAMS=foo.true \
+ git -c foo.true config foo.true >actual &&
+ test_cmp expect actual
+'
+
sane_unset GIT_TRACE2_BRIEF
# Now test without environment variables and get all Trace2 settings