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 /config.c | |
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 '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 */ |