diff options
author | Junio C Hamano <gitster@pobox.com> | 2024-08-14 23:54:51 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-08-14 23:54:51 +0200 |
commit | 4cf2f1be5639a3dc3e46ad7fbd71ad1dc16d5458 (patch) | |
tree | a844f13dc93a4df51dcf6433e7bbcfe9bbedd755 /t/t1300-config.sh | |
parent | Merge branch 'jk/apply-patch-mode-check-fix' (diff) | |
parent | config.c: avoid segfault with --fixed-value and valueless config (diff) | |
download | git-4cf2f1be5639a3dc3e46ad7fbd71ad1dc16d5458.tar.xz git-4cf2f1be5639a3dc3e46ad7fbd71ad1dc16d5458.zip |
Merge branch 'tb/config-fixed-value-with-valueless-true'
"git config --value=foo --fixed-value section.key newvalue" barfed
when the existing value in the configuration file used the
valueless true syntax, which has been corrected.
* tb/config-fixed-value-with-valueless-true:
config.c: avoid segfault with --fixed-value and valueless config
Diffstat (limited to 't/t1300-config.sh')
-rwxr-xr-x | t/t1300-config.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t1300-config.sh b/t/t1300-config.sh index 9de2d95f06..f13277c8f3 100755 --- a/t/t1300-config.sh +++ b/t/t1300-config.sh @@ -2704,6 +2704,15 @@ test_expect_success '--get and --get-all with --fixed-value' ' test_must_fail git config --file=config --get-regexp --fixed-value fixed+ non-existent ' +test_expect_success '--fixed-value with value-less configuration' ' + test_when_finished rm -f config && + cat >config <<-\EOF && + [section] + key + EOF + git config --file=config --fixed-value section.key value pattern +' + test_expect_success 'includeIf.hasconfig:remote.*.url' ' git init hasremoteurlTest && test_when_finished "rm -rf hasremoteurlTest" && |