Anonymous avatar Anonymous committed abec100

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" <bfields@citi.umich.edu>;
Signed-off-by: Junio C Hamano <junkio@cox.net>;

Comments (0)

Files changed (2)

Documentation/git-send-email.txt

 	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

git-send-email.perl

                   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.
 			}
 		} 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",
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.