git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git-format-patch: add a new format.cc configuration variable
@ 2008-04-26 21:19 Miklos Vajna
  2008-04-26 22:31 ` Johannes Schindelin
  0 siblings, 1 reply; 12+ messages in thread
From: Miklos Vajna @ 2008-04-26 21:19 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

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>
---
 Documentation/git-format-patch.txt |    1 +
 builtin-log.c                      |    7 +++++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt
index b5207b7..b2bdcb2 100644
--- a/Documentation/git-format-patch.txt
+++ b/Documentation/git-format-patch.txt
@@ -168,6 +168,7 @@ and file suffix, and number patches when outputting more than one.
         subjectprefix = CHANGE
         suffix = .txt
         numbered = auto
+        cc = <email>
 ------------
 
 
diff --git a/builtin-log.c b/builtin-log.c
index 1670d0b..d7907c9 100644
--- a/builtin-log.c
+++ b/builtin-log.c
@@ -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;
 	}
-- 
1.5.5.1.91.g499fc.dirty

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2008-04-29 17:23 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-26 21:19 [PATCH] git-format-patch: add a new format.cc configuration variable Miklos Vajna
2008-04-26 22:31 ` Johannes Schindelin
2008-04-26 23:27   ` Miklos Vajna
2008-04-27 11:53     ` Johannes Schindelin
2008-04-27 12:14       ` [PATCH] git-send-email: add a new sendemail.cc " Miklos Vajna
2008-04-27 20:26         ` Junio C Hamano
2008-04-27 22:42           ` Miklos Vajna
2008-04-27 23:51             ` Jeff King
2008-04-29 10:56           ` [PATCH] Add tests for " Miklos Vajna
2008-04-29 17:21       ` [PATCH] git-format-patch: add a new format.cc " Jay Soffian
2008-04-27  0:14   ` Junio C Hamano
2008-04-27  5:09     ` [PATCH] bash: Add long option completion for 'git send-email' Teemu Likonen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).