aboutsummaryrefslogtreecommitdiff
path: root/builtin/log.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2026-03-10 14:23:17 -0700
committerJunio C Hamano <gitster@pobox.com>2026-03-10 14:23:17 -0700
commit9a8aebae972de22ecd5adb92fec9d77147949c8a (patch)
treede2a54941699c4856071e6536966af4ba8f2ac5f /builtin/log.c
parentd181b9354cf85b44455ce3ca9e6af0b9559e0ae2 (diff)
parentea3a62c40ef2d31a6ab87ae3b8be46690d549b58 (diff)
downloadgit-9a8aebae972de22ecd5adb92fec9d77147949c8a.tar.xz
Merge branch 'kh/format-patch-noprefix-is-boolean'
The configuration variable format.noprefix did not behave as a proper boolean variable, which has now been fixed and documented. * kh/format-patch-noprefix-is-boolean: doc: diff-options.adoc: make *.noprefix split translatable doc: diff-options.adoc: show format.noprefix for format-patch format-patch: make format.noprefix a boolean
Diffstat (limited to 'builtin/log.c')
-rw-r--r--builtin/log.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/builtin/log.c b/builtin/log.c
index 7cb919bca9..89e8b8f011 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -39,6 +39,7 @@
#include "mailmap.h"
#include "progress.h"
#include "commit-slab.h"
+#include "advice.h"
#include "commit-reach.h"
#include "range-diff.h"
@@ -1095,7 +1096,18 @@ static int git_format_config(const char *var, const char *value,
return 0;
}
if (!strcmp(var, "format.noprefix")) {
- format_no_prefix = 1;
+ format_no_prefix = git_parse_maybe_bool(value);
+ if (format_no_prefix < 0) {
+ int status = die_message(
+ _("bad boolean config value '%s' for '%s'"),
+ value, var);
+ advise(_("'%s' used to accept any value and "
+ "treat that as 'true'.\n"
+ "Now it only accepts boolean values, "
+ "like what '%s' does.\n"),
+ var, "diff.noprefix");
+ exit(status);
+ }
return 0;
}