diff options
Diffstat (limited to 'mailinfo.c')
-rw-r--r-- | mailinfo.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/mailinfo.c b/mailinfo.c index 542d4458f6..9681864216 100644 --- a/mailinfo.c +++ b/mailinfo.c @@ -1,5 +1,7 @@ -#include "cache.h" +#include "git-compat-util.h" #include "config.h" +#include "gettext.h" +#include "hex-ll.h" #include "utf8.h" #include "strbuf.h" #include "mailinfo.h" @@ -597,7 +599,7 @@ static int check_header(struct mailinfo *mi, ret = 1; goto check_header_out; } - if (parse_header(line, "Message-Id", mi, &sb)) { + if (parse_header(line, "Message-ID", mi, &sb)) { if (mi->add_message_id) mi->message_id = strbuf_detach(&sb, NULL); ret = 1; @@ -829,7 +831,7 @@ static int handle_commit_msg(struct mailinfo *mi, struct strbuf *line) if (patchbreak(line)) { if (mi->message_id) strbuf_addf(&mi->log_message, - "Message-Id: %s\n", mi->message_id); + "Message-ID: %s\n", mi->message_id); return 1; } @@ -1239,17 +1241,20 @@ int mailinfo_parse_quoted_cr_action(const char *actionstr, int *action) return 0; } -static int git_mailinfo_config(const char *var, const char *value, void *mi_) +static int git_mailinfo_config(const char *var, const char *value, + const struct config_context *ctx, void *mi_) { struct mailinfo *mi = mi_; if (!starts_with(var, "mailinfo.")) - return git_default_config(var, value, NULL); + return git_default_config(var, value, ctx, NULL); if (!strcmp(var, "mailinfo.scissors")) { mi->use_scissors = git_config_bool(var, value); return 0; } if (!strcmp(var, "mailinfo.quotedcr")) { + if (!value) + return config_error_nonbool(var); if (mailinfo_parse_quoted_cr_action(value, &mi->quoted_cr) != 0) return error(_("bad action '%s' for '%s'"), value, var); return 0; |