diff options
Diffstat (limited to 'builtin')
| -rw-r--r-- | builtin/log.c | 14 |
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; } |
