Skip to contentSkip to conversation

Howto send many commits as mail-patches?

DISCUSSION Sam Ravnborg 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

Hi all.

I have a collection of commits in my GIT repository that I like to send out to linux-kernel.
But my initial experiments with git-send-emails.perl fall out bad.

I did the following:

1) First I created a mbox with the patches:
git format-patch -n --mbox --stdout -M -B b286e39207237e2f6929959372bf66d9a8d05a82 > mbox

The mbox looked OK. -M -B were from the man page and since the patchset includes a number of renames it made the mbox considerably smaller.

So I went on an tried to send the mails:
git-send-email.perl --from "Sam Ravnborg <[email protected]>" --to "[email protected]" --chain-reply-to "" mbox

It just send out two huge mails containing all of the mbox. Also it cc:ed all people included in "Signed-off-by". That is sometimes a nice feature but for testing I like it to be optional.

Can someone give me a nice howto so I can see how to send out the mails.

TIA,
Sam

#1 lore raw
Quoted 15 lines · Sam Ravnborg

Hi all.

I have a collection of commits in my GIT repository that I like to send out to linux-kernel.
But my initial experiments with git-send-emails.perl fall out bad.

I did the following:

1) First I created a mbox with the patches:
git format-patch -n --mbox --stdout -M -B b286e39207237e2f6929959372bf66d9a8d05a82 > mbox

The mbox looked OK. -M -B were from the man page and since the patchset includes a number of renames it made the mbox considerably smaller.

Quoted 7 lines

So I went on an tried to send the mails:

It just send out two huge mails containing all of the mbox. Also it cc:ed all people included in "Signed-off-by". That is sometimes a nice feature but for testing I like it to be optional.

Can someone give me a nice howto so I can see how to send out the mails.

Try:

	mkdir ../pending/
	git format-patch -n --mbox -o ../pending/ -M -B b286e39207237e2f6929959372bf66d9a8d05a82
	git-send-email.perl --from "Sam Ravnborg <[email protected]>" --to "[email protected]" --chain-reply-to "" ../pending/

With this method, you can examine the files in ../pending/, edit patch comments if you want, add an "introductory" mail, etc.

The Signed-off-by: cc:ing is currently not something that can be disabled, but you can do something like this to stop it temporarily:

(cut and pasted, so it probably won't directly apply)

git-send-email.perl +1 -1
index ec1428d..9c7d0b8 100755
@@ -322,7 +322,7 @@ foreach my $t (@files) {
                        }
                } else {
                        $message .=  $_;
-                       if (/^Signed-off-by: (.*)$/i) {
+                       if (/^XSigned-off-by: (.*)$/i) {
                                my $c = $1;
                                chomp $c;
                                push @cc, $c;

Hope that helped,

Signature · 2 lines
Ryan Anderson
  sometimes Pug Majere