aboutsummaryrefslogtreecommitdiffstats
path: root/notes-utils.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-12-20 10:14:54 -0800
committerJunio C Hamano <gitster@pobox.com>2023-12-20 10:14:54 -0800
commit2b9cbc6d01ba3e54de09efde1dd2ed46c2d36e94 (patch)
tree6ccb23924e2b2d806b3d67cf3796d3d7ad4695a2 /notes-utils.c
parentMerge branch 'jk/bisect-reset-fix' (diff)
parentfsck: handle NULL value when parsing message config (diff)
downloadgit-2b9cbc6d01ba3e54de09efde1dd2ed46c2d36e94.tar.gz
git-2b9cbc6d01ba3e54de09efde1dd2ed46c2d36e94.zip
Merge branch 'jk/implicit-true'
Some codepaths did not correctly parse configuration variables specified with valueless "true", which has been corrected. * jk/implicit-true: fsck: handle NULL value when parsing message config trailer: handle NULL value when parsing trailer-specific config submodule: handle NULL value when parsing submodule.*.branch help: handle NULL value for alias.* config trace2: handle NULL values in tr2_sysenv config callback setup: handle NULL value when parsing extensions config: handle NULL value when parsing non-bools
Diffstat (limited to 'notes-utils.c')
-rw-r--r--notes-utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/notes-utils.c b/notes-utils.c
index 97c031c26e..01f4f5b424 100644
--- a/notes-utils.c
+++ b/notes-utils.c
@@ -112,6 +112,8 @@ static int notes_rewrite_config(const char *k, const char *v,
}
return 0;
} else if (!c->refs_from_env && !strcmp(k, "notes.rewriteref")) {
+ if (!v)
+ return config_error_nonbool(k);
/* note that a refs/ prefix is implied in the
* underlying for_each_glob_ref */
if (starts_with(v, "refs/notes/"))