From dbd21447361364d646f3972738a475a92f711513 Mon Sep 17 00:00:00 2001 From: Adam Roben Date: Sun, 1 Jul 2007 17:48:59 -0700 Subject: format-patch: Add format.subjectprefix config option This change lets you use the format.subjectprefix config option to override the default subject prefix. Signed-off-by: Adam Roben Signed-off-by: Junio C Hamano --- builtin-log.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'builtin-log.c') diff --git a/builtin-log.c b/builtin-log.c index a4186eac8..5dc2c1c23 100644 --- a/builtin-log.c +++ b/builtin-log.c @@ -265,6 +265,7 @@ static int istitlechar(char c) static char *extra_headers = NULL; static int extra_headers_size = 0; +static const char *fmt_patch_subject_prefix = "PATCH"; static const char *fmt_patch_suffix = ".patch"; static int git_format_config(const char *var, const char *value) @@ -290,6 +291,13 @@ static int git_format_config(const char *var, const char *value) if (!strcmp(var, "diff.color") || !strcmp(var, "color.diff")) { return 0; } + if (!strcmp(var, "format.subjectprefix")) { + if (!value) + die("format.subjectprefix without value"); + fmt_patch_subject_prefix = xstrdup(value); + return 0; + } + return git_log_config(var, value); } @@ -459,6 +467,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix) rev.diffopt.msg_sep = ""; rev.diffopt.recursive = 1; + rev.subject_prefix = fmt_patch_subject_prefix; rev.extra_headers = extra_headers; /* -- cgit v1.2.1