From: J. Bruce Fields Date: Mon, 19 Mar 2007 01:37:53 +0000 (-0400) Subject: Make git-send-email aware of Cc: lines. X-Git-Tag: v1.5.1-rc1~9 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=abec100c3382f7d7b759f915a86e9773277263b6;p=git.git Make git-send-email aware of Cc: lines. In the Linux kernel, for example, it's common to include Cc: lines for cases when you want to remember to cc someone on a patch without necessarily claiming they signed off on it. Make git-send-email aware of these. Signed-off-by: "J. Bruce Fields" Signed-off-by: Junio C Hamano --- diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt index 9b3aabb6f..682313e95 100644 --- a/Documentation/git-send-email.txt +++ b/Documentation/git-send-email.txt @@ -60,7 +60,8 @@ The --cc option must be repeated for each user you want on the cc list. is not set, this will be prompted for. --no-signed-off-by-cc:: - Do not add emails found in Signed-off-by: lines to the cc list. + Do not add emails found in Signed-off-by: or Cc: lines to the + cc list. --quiet:: Make git-send-email less verbose. One line per email should be diff --git a/git-send-email.perl b/git-send-email.perl index 6989c0260..ae50990d0 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -65,8 +65,8 @@ Options: Defaults to on. --no-signed-off-cc Suppress the automatic addition of email addresses - that appear in a Signed-off-by: line, to the cc: list. - Note: Using this option is not recommended. + that appear in Signed-off-by: or Cc: lines to the cc: + list. Note: Using this option is not recommended. --smtp-server If set, specifies the outgoing SMTP server to use. Defaults to localhost. @@ -572,8 +572,8 @@ foreach my $t (@files) { } } else { $message .= $_; - if (/^Signed-off-by: (.*)$/i && !$no_signed_off_cc) { - my $c = $1; + if (/^(Signed-off-by|Cc): (.*)$/i && !$no_signed_off_cc) { + my $c = $2; chomp $c; push @cc, $c; printf("(sob) Adding cc: %s from line '%s'\n",