diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-12-05 14:49:56 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-12-05 14:49:56 +0900 |
| commit | 0534b78576b410d10e2cfb61802ea829713bde03 (patch) | |
| tree | 1c6c71b66cf0491260d82ae7008782e7b9ddcc68 /fetch-pack.c | |
| parent | 5eadcbf8151f04d5c5bf0b8865ee8fa8447878f7 (diff) | |
| parent | 0bd16856ffb3968de73699ad0555d1fae6c45406 (diff) | |
| download | git-0534b78576b410d10e2cfb61802ea829713bde03.tar.gz | |
Merge branch 'jc/optional-path'
"git config get --path" segfaulted on an ":(optional)path" that
does not exist, which has been corrected.
* jc/optional-path:
config: really treat missing optional path as not configured
config: really pretend missing :(optional) value is not there
config: mark otherwise unused function as file-scope static
Diffstat (limited to 'fetch-pack.c')
| -rw-r--r-- | fetch-pack.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fetch-pack.c b/fetch-pack.c index 78c45d4a15..40316c9a34 100644 --- a/fetch-pack.c +++ b/fetch-pack.c @@ -1865,8 +1865,9 @@ int fetch_pack_fsck_config(const char *var, const char *value, if (git_config_pathname(&path, var, value)) return -1; - strbuf_addf(msg_types, "%cskiplist=%s", - msg_types->len ? ',' : '=', path); + if (path) + strbuf_addf(msg_types, "%cskiplist=%s", + msg_types->len ? ',' : '=', path); free(path); return 0; } |
