summaryrefslogtreecommitdiffstats
path: root/builtin/log.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-12-20 19:14:54 +0100
committerJunio C Hamano <gitster@pobox.com>2023-12-20 19:14:54 +0100
commit2b9cbc6d01ba3e54de09efde1dd2ed46c2d36e94 (patch)
tree6ccb23924e2b2d806b3d67cf3796d3d7ad4695a2 /builtin/log.c
parentMerge branch 'jk/bisect-reset-fix' (diff)
parentfsck: handle NULL value when parsing message config (diff)
downloadgit-2b9cbc6d01ba3e54de09efde1dd2ed46c2d36e94.tar.xz
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 'builtin/log.c')
-rw-r--r--builtin/log.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/builtin/log.c b/builtin/log.c
index 87fd1c8560..1f61a388cf 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -594,8 +594,11 @@ static int git_log_config(const char *var, const char *value,
decoration_style = 0; /* maybe warn? */
return 0;
}
- if (!strcmp(var, "log.diffmerges"))
+ if (!strcmp(var, "log.diffmerges")) {
+ if (!value)
+ return config_error_nonbool(var);
return diff_merges_config(value);
+ }
if (!strcmp(var, "log.showroot")) {
default_show_root = git_config_bool(var, value);
return 0;