(#6862) Add a default subject for the mail_patches rake task
This will prevent committers to forget to write cover letter subject
when rake mail_patches needs to send multiple e-mails.
It defaults to the "type" and "branch name" of the patch-set.
This is taken from Brice's patch against Puppet
(37f9ca09135330ed180fb68d9295a4967a5cc857).
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
Jacob Helwig
13 years ago
33 | 33 | # If we've got more than one patch, add --compose |
34 | 34 | if files.length > 1 |
35 | 35 | compose = "--compose" |
36 | subject = %Q{--subject "#{type} #{name} against #{parent}"} | |
36 | 37 | else |
37 | 38 | compose = "" |
39 | subject = "" | |
38 | 40 | end |
39 | 41 | |
40 | 42 | # Now send the mail. |
41 | sh "git send-email #{compose} --no-signed-off-by-cc --suppress-from --to puppet-dev@googlegroups.com 00*.patch" | |
43 | sh "git send-email #{compose} #{subject} --no-signed-off-by-cc --suppress-from --to puppet-dev@googlegroups.com 00*.patch" | |
42 | 44 | |
43 | 45 | # Finally, clean up the patches |
44 | 46 | sh "rm 00*.patch" |