Skip to content

Commit fe8928e

Browse files
Miklos Vajnagitster
authored andcommitted
git-format-patch: add a new format.cc configuration variable
Some projects prefer to always CC patches to a given mailing list. In these cases, it's handy to configure that address once. Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent f0ec47b commit fe8928e

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Documentation/git-format-patch.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ and file suffix, and number patches when outputting more than one.
168168
subjectprefix = CHANGE
169169
suffix = .txt
170170
numbered = auto
171+
cc = <email>
171172
------------
172173

173174

builtin-log.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,13 @@ static int git_format_config(const char *var, const char *value)
485485
fmt_patch_suffix = xstrdup(value);
486486
return 0;
487487
}
488+
if (!strcmp(var, "format.cc")) {
489+
if (!value)
490+
return config_error_nonbool(var);
491+
ALLOC_GROW(extra_cc, extra_cc_nr + 1, extra_cc_alloc);
492+
extra_cc[extra_cc_nr++] = xstrdup(value);
493+
return 0;
494+
}
488495
if (!strcmp(var, "diff.color") || !strcmp(var, "color.diff")) {
489496
return 0;
490497
}

0 commit comments

Comments
 (0)