git-format-patch: add a new format.cc configuration variable
authorMiklos Vajna <vmiklos@frugalware.org>
Sat, 26 Apr 2008 21:19:06 +0000 (23:19 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 30 Apr 2008 02:56:25 +0000 (19:56 -0700)
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>
Documentation/git-format-patch.txt
builtin-log.c
index b5207b76040d02e34452175779340658b943a84e..2336b3e3c2829d5da712c1d477da1f93a2f382c3 100644 (file)
@@ -168,6 +168,7 @@ and file suffix, and number patches when outputting more than one.
         subjectprefix = CHANGE
         suffix = .txt
         numbered = auto
+       cc = <email>
 ------------
 
 
index 1670d0b334efe7d01cbf0118f7b9dca874f8d473..d7907c942f3d7c04b44fff497e339c0fcd7de5ff 100644 (file)
@@ -485,6 +485,13 @@ static int git_format_config(const char *var, const char *value)
                fmt_patch_suffix = xstrdup(value);
                return 0;
        }
+       if (!strcmp(var, "format.cc")) {
+               if (!value)
+                       return config_error_nonbool(var);
+               ALLOC_GROW(extra_cc, extra_cc_nr + 1, extra_cc_alloc);
+               extra_cc[extra_cc_nr++] = xstrdup(value);
+               return 0;
+       }
        if (!strcmp(var, "diff.color") || !strcmp(var, "color.diff")) {
                return 0;
        }