diff options
author | Adam Roben <aroben@apple.com> | 2007-07-01 17:48:59 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-07-02 21:05:45 -0700 |
commit | dbd21447361364d646f3972738a475a92f711513 (patch) | |
tree | 9ff09b7a0e46131de33ef3e5cebe3efb51a52488 /builtin-log.c | |
parent | 05dcd69891632101d347b2f8a6bc37a08878aa1a (diff) | |
download | git-dbd21447361364d646f3972738a475a92f711513.tar.gz |
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 <aroben@apple.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-log.c')
-rw-r--r-- | builtin-log.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/builtin-log.c b/builtin-log.c index a4186eac8e..5dc2c1c230 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; /* |