@matheusbsbs / matheus-bagliano / commits / fe8928e6e8
Fork 0

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>

Miklos Vajna committed Apr 26, 2008 at 23:19 UTC fe8928e6e802f8519e133f085783fb664f1a0d6b
2 files changed +8
Documentation/git-format-patch.txt
+1
@@ -168,6 +168,7 @@ and file suffix, and number patches when outputting more than one.
168 subjectprefix = CHANGE
169 suffix = .txt
170 numbered = auto
171 + cc = <email>
172 ------------
173
174
builtin-log.c
+7
@@ -485,6 +485,13 @@ static int git_format_config(const char *var, const char *value)
485 fmt_patch_suffix = xstrdup(value);
486 return 0;
487 }
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 + }
495 if (!strcmp(var, "diff.color") || !strcmp(var, "color.diff")) {
496 return 0;
497 }