diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-08-26 11:10:18 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-08-26 11:10:18 -0700 |
| commit | 5613c83f306870cbd0d4d4b3e7afb626c74536a8 (patch) | |
| tree | dc8ded456b8487607e0036857ec2663059068c48 /config.c | |
| parent | a991ffff929e75509eb3bc4012cc43a2e6994f90 (diff) | |
| parent | 615d2de3b457272216d4179ceb82b3b2b86b1929 (diff) | |
| download | git-5613c83f306870cbd0d4d4b3e7afb626c74536a8.tar.gz | |
Merge branch 'tb/config-fixed-value-with-valueless-true' into maint-2.46
"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 'config.c')
| -rw-r--r-- | config.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2914,7 +2914,7 @@ static int matches(const char *key, const char *value, { if (strcmp(key, store->key)) return 0; /* not ours */ - if (store->fixed_value) + if (store->fixed_value && value) return !strcmp(store->fixed_value, value); if (!store->value_pattern) return 1; /* always matches */ |
