* [PATCH 0/2] More git-send-email updates
@ 2006-02-13 8:22 Ryan Anderson
2006-02-13 8:22 ` [PATCH 1/2] send-email: Add some options for controlling how addresses are automatically Ryan Anderson
2006-02-13 15:58 ` [PATCH 0/2] More git-send-email updates Nicolas Vilz 'niv'
0 siblings, 2 replies; 4+ messages in thread
From: Ryan Anderson @ 2006-02-13 8:22 UTC (permalink / raw)
To: Junio C Hamano, git
To follow up on some conversations related to git-send-email this week, here are two updates:
The first adds a command line option to suppress adding the "From" address to
the list of addresses to Cc, when it appears in a From: header line. (Note
that git-send-email never looked for From: lines inside the body of a message
to use as a source for Cc: addresses, which, given the patch formats Linus has
previously talked about, is probably a bug.)
The second patch adds the mythical "--cc" option. I say "mythical" because it
has never existed, but both Junio and I have mentioned it (or used it)
recently, so we both *assumed* that it existed. I think that's justification
for adding it.
--
Ryan Anderson
sometimes Pug Majere
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/2] send-email: Add --cc
2006-02-13 8:22 ` [PATCH 1/2] send-email: Add some options for controlling how addresses are automatically Ryan Anderson
@ 2006-02-13 8:22 ` Ryan Anderson
0 siblings, 0 replies; 4+ messages in thread
From: Ryan Anderson @ 2006-02-13 8:22 UTC (permalink / raw)
To: Junio C Hamano, git; +Cc: Ryan Anderson
Since Junio used this in an example, and I've personally tried to use it, I
suppose the option should actually exist.
Signed-off-by: Ryan Anderson <ryan@michonline.com>
---
Documentation/git-send-email.txt | 3 +++
git-send-email.perl | 8 ++++++--
2 files changed, 9 insertions(+), 2 deletions(-)
6d18725b9d46259162cfe54c9e0e369558394816
diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt
index c2f52f5..8c58685 100644
--- a/Documentation/git-send-email.txt
+++ b/Documentation/git-send-email.txt
@@ -24,6 +24,9 @@ OPTIONS
-------
The options available are:
+--cc::
+ Specify a starting "Cc:" value for each email.
+
--chain-reply-to, --no-chain-reply-to::
If this is set, each email will be sent as a reply to the previous
email sent. If disabled with "--no-chain-reply-to", all emails after
diff --git a/git-send-email.perl b/git-send-email.perl
index abffca5..13b85dd 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -31,7 +31,7 @@ sub cleanup_compose_files();
my $compose_filename = ".msg.$$";
# Variables we fill in automatically, or via prompting:
-my (@to,@cc,$initial_reply_to,$initial_subject,@files,$from,$compose);
+my (@to,@cc,@initial_cc,$initial_reply_to,$initial_subject,@files,$from,$compose);
# Behavior modification variables
my ($chain_reply_to, $smtp_server, $quiet, $suppress_from, $no_signed_off_cc) = (1, "localhost", 0, 0, 0);
@@ -48,6 +48,7 @@ my $rc = GetOptions("from=s" => \$from,
"in-reply-to=s" => \$initial_reply_to,
"subject=s" => \$initial_subject,
"to=s" => \@to,
+ "cc=s" => \@initial_cc,
"chain-reply-to!" => \$chain_reply_to,
"smtp-server=s" => \$smtp_server,
"compose" => \$compose,
@@ -199,6 +200,9 @@ Options:
--to Specify the primary "To:" line of the email.
+ --cc Specify an initial "Cc:" list for the entire series
+ of emails.
+
--compose Use \$EDITOR to edit an introductory message for the
patch series.
@@ -298,7 +302,7 @@ $subject = $initial_subject;
foreach my $t (@files) {
open(F,"<",$t) or die "can't open file $t";
- @cc = ();
+ @cc = @initial_cc;
my $found_mbox = 0;
my $header_done = 0;
$message = "";
--
1.2.0.g6d18
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 1/2] send-email: Add some options for controlling how addresses are automatically
2006-02-13 8:22 [PATCH 0/2] More git-send-email updates Ryan Anderson
@ 2006-02-13 8:22 ` Ryan Anderson
2006-02-13 8:22 ` [PATCH 2/2] send-email: Add --cc Ryan Anderson
2006-02-13 15:58 ` [PATCH 0/2] More git-send-email updates Nicolas Vilz 'niv'
1 sibling, 1 reply; 4+ messages in thread
From: Ryan Anderson @ 2006-02-13 8:22 UTC (permalink / raw)
To: Junio C Hamano, git; +Cc: Ryan Anderson
Signed-off-by: Ryan Anderson <ryan@michonline.com>
---
Documentation/git-send-email.txt | 7 +++++++
git-send-email.perl | 15 ++++++++++++---
2 files changed, 19 insertions(+), 3 deletions(-)
dc4ad3ef1b29ce35dc0ace4d284cfab5e594bfb7
diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt
index 00537d8..c2f52f5 100644
--- a/Documentation/git-send-email.txt
+++ b/Documentation/git-send-email.txt
@@ -48,6 +48,9 @@ The options available are:
Only necessary if --compose is also set. If --compose
is not set, this will be prompted for.
+--no-signed-off-by-cc::
+ Do not add emails foudn in Signed-off-by: lines to the cc list.
+
--quiet::
Make git-send-email less verbose. One line per email should be
all that is output.
@@ -61,6 +64,10 @@ The options available are:
Only necessary if --compose is also set. If --compose
is not set, this will be prompted for.
+--suppress-from::
+ Do not add the From: address to the cc: list, if it shows up in a From:
+ line.
+
--to::
Specify the primary recipient of the emails generated.
Generally, this will be the upstream maintainer of the
diff --git a/git-send-email.perl b/git-send-email.perl
index 3f1b3ca..abffca5 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -34,7 +34,7 @@ my $compose_filename = ".msg.$$";
my (@to,@cc,$initial_reply_to,$initial_subject,@files,$from,$compose);
# Behavior modification variables
-my ($chain_reply_to, $smtp_server, $quiet) = (1, "localhost", 0);
+my ($chain_reply_to, $smtp_server, $quiet, $suppress_from, $no_signed_off_cc) = (1, "localhost", 0, 0, 0);
# Example reply to:
#$initial_reply_to = ''; #<20050203173208.GA23964@foobar.com>';
@@ -52,6 +52,8 @@ my $rc = GetOptions("from=s" => \$from,
"smtp-server=s" => \$smtp_server,
"compose" => \$compose,
"quiet" => \$quiet,
+ "suppress-from" => \$suppress_from,
+ "no-signed-off-cc" => \$no_signed_off_cc,
);
# Now, let's fill any that aren't set in with defaults:
@@ -212,13 +214,19 @@ Options:
email sent, rather than to the first email sent.
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.
+
--smtp-server If set, specifies the outgoing SMTP server to use.
Defaults to localhost.
+ --suppress-from Supress sending emails to yourself if your address
+ appears in a From: line.
+
--quiet Make git-send-email less verbose. One line per email should be
all that is output.
-
Error: Please specify a file or a directory on the command line.
EOT
exit(1);
@@ -304,6 +312,7 @@ foreach my $t (@files) {
$subject = $1;
} elsif (/^(Cc|From):\s+(.*)$/) {
+ next if ($2 eq $from && $suppress_from);
printf("(mbox) Adding cc: %s from line '%s'\n",
$2, $_) unless $quiet;
push @cc, $2;
@@ -332,7 +341,7 @@ foreach my $t (@files) {
}
} else {
$message .= $_;
- if (/^Signed-off-by: (.*)$/i) {
+ if (/^Signed-off-by: (.*)$/i && !$no_signed_off_cc) {
my $c = $1;
chomp $c;
push @cc, $c;
--
1.2.0.g6d18
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] More git-send-email updates
2006-02-13 8:22 [PATCH 0/2] More git-send-email updates Ryan Anderson
2006-02-13 8:22 ` [PATCH 1/2] send-email: Add some options for controlling how addresses are automatically Ryan Anderson
@ 2006-02-13 15:58 ` Nicolas Vilz 'niv'
1 sibling, 0 replies; 4+ messages in thread
From: Nicolas Vilz 'niv' @ 2006-02-13 15:58 UTC (permalink / raw)
To: git
Ryan Anderson wrote:
> To follow up on some conversations related to git-send-email this week, here are two updates:
>
> The first adds a command line option to suppress adding the "From" address to
> the list of addresses to Cc, when it appears in a From: header line. (Note
> that git-send-email never looked for From: lines inside the body of a message
> to use as a source for Cc: addresses, which, given the patch formats Linus has
> previously talked about, is probably a bug.)
>
> The second patch adds the mythical "--cc" option. I say "mythical" because it
> has never existed, but both Junio and I have mentioned it (or used it)
> recently, so we both *assumed* that it existed. I think that's justification
> for adding it.
>
it is a very nice idea to use git-send-email together with
git-format-patch --stdout, but i think, maybe i do something wrong... I
tried that cli-syntax Junio mentioned in "Whats in git.git"
git format-patch --stdout <branch_01>..<branch_02>|git send-email --to
<email_address>
and got a "Error: Please specify a file or a directory on the command
line.".
Besides, git asks me for a From-Header (which is fixed with this patch,
I suppose)
I use git 1.2.0 directly from your git-repository.
so actually git-send-email does not work with this syntax above.
If I first produce the patches, save them into another directory and
afterwards give git-send-email that directory for lunch, it works...
is there any other work-around for this everyday-task but a shellscript
which temporarily creates a patch-dir which contains the patches and
removes it after git-send-email is done with it?
Sincerly
Nicolas
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-02-13 16:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-13 8:22 [PATCH 0/2] More git-send-email updates Ryan Anderson
2006-02-13 8:22 ` [PATCH 1/2] send-email: Add some options for controlling how addresses are automatically Ryan Anderson
2006-02-13 8:22 ` [PATCH 2/2] send-email: Add --cc Ryan Anderson
2006-02-13 15:58 ` [PATCH 0/2] More git-send-email updates Nicolas Vilz 'niv'
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.