summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3ee79d9)
raw | patch | inline | side by side (parent: 3ee79d9)
author | Daniel Barkalow <barkalow@iabervon.org> | |
Tue, 19 Feb 2008 07:40:35 +0000 (02:40 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 20 Feb 2008 05:49:38 +0000 (21:49 -0800) |
When you have particular reviewers you want to sent particular series
to, it's nice to be able to generate the whole series with them as
additional recipients, without configuring them into your general
headers or adding them by hand afterwards.
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
to, it's nice to be able to generate the whole series with them as
additional recipients, without configuring them into your general
headers or adding them by hand afterwards.
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-format-patch.txt | patch | blob | history | |
builtin-log.c | patch | blob | history | |
t/t4014-format-patch.sh | patch | blob | history |
index b27bb9476d1871750745c7ab68da506bb41af149..b5207b76040d02e34452175779340658b943a84e 100644 (file)
[--in-reply-to=Message-Id] [--suffix=.<sfx>]
[--ignore-if-in-upstream]
[--subject-prefix=Subject-Prefix]
+ [--cc=<email>]
[--cover-letter]
[ <since> | <revision range> ]
allows for useful naming of a patch series, and can be
combined with the --numbered option.
+--cc=<email>::
+ Add a "Cc:" header to the email headers. This is in addition
+ to any configured headers, and may be used multiple times.
+
--cover-letter::
Generate a cover letter template. You still have to fill in
a description, but the shortlog and the diffstat will be
diff --git a/builtin-log.c b/builtin-log.c
index 71ae55b9eb661965ee19e7ce9701f0526cbf7b4d..0b348eb6b3babaa9c5e30136f1e4cd849e46f27d 100644 (file)
--- a/builtin-log.c
+++ b/builtin-log.c
die("Need a number for --start-number");
start_number = strtol(argv[i], NULL, 10);
}
+ else if (!prefixcmp(argv[i], "--cc=")) {
+ ALLOC_GROW(extra_cc, extra_cc_nr + 1, extra_cc_alloc);
+ extra_cc[extra_cc_nr++] = xstrdup(argv[i] + 5);
+ }
else if (!strcmp(argv[i], "-k") ||
!strcmp(argv[i], "--keep-subject")) {
keep_subject = 1;
index 43d8841d7d4be0705b27113ffcc345a40469de81..a39e786f71f0f7bb748ff8b42af47c0ca6a184f9 100755 (executable)
--- a/t/t4014-format-patch.sh
+++ b/t/t4014-format-patch.sh
grep "^ *S. E. Cipient <scipient@example.com>$" hdrs4
'
+test_expect_success 'additional command line cc' '
+
+ git config --replace-all format.headers "Cc: R. E. Cipient <rcipient@example.com>" &&
+ git format-patch --cc="S. E. Cipient <scipient@example.com>" --stdout master..side | sed -e "/^$/Q" >patch5 &&
+ grep "^Cc: R. E. Cipient <rcipient@example.com>,$" patch5 &&
+ grep "^ *S. E. Cipient <scipient@example.com>$" patch5
+'
+
test_expect_success 'multiple files' '
rm -rf patches/ &&