From: Tom Russello <tom.russello@grenoble-inp.org>
To: git@vger.kernel.org
Cc: erwan.mathoniere@grenoble-inp.org, samuel.groot@grenoble-inp.org,
jordan.de-gea@grenoble-inp.org, matthieu.moy@grenoble-inp.fr,
e@80x24.org, aaron@schrab.com, gitster@pobox.com,
Tom RUSSELLO <tom.russello@grenoble-inp.org>
Subject: [PATCH v3 3/6] t9001: shorten send-email's output
Date: Tue, 7 Jun 2016 16:01:45 +0200 [thread overview]
Message-ID: <20160607140148.23242-4-tom.russello@grenoble-inp.org> (raw)
In-Reply-To: <20160607140148.23242-1-tom.russello@grenoble-inp.org>
Messages displayed by `send-email` should be shortened to avoid displaying
unnecesseray informations.
Signed-off-by: Samuel GROOT <samuel.groot@grenoble-inp.org>
Signed-off-by: Tom RUSSELLO <tom.russello@grenoble-inp.org>
Signed-off-by: Matthieu MOY <matthieu.moy@grenoble-inp.fr>
---
git-send-email.perl | 22 +++++++++----------
t/t9001-send-email.sh | 58 +++++++++++++++++++++++++--------------------------
2 files changed, 40 insertions(+), 40 deletions(-)
diff --git a/git-send-email.perl b/git-send-email.perl
index 6958785..4822f41 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -1478,14 +1478,14 @@ foreach my $t (@files) {
$sauthor = sanitize_address($author);
next if $suppress_cc{'author'};
next if $suppress_cc{'self'} and $sauthor eq $sender;
- printf("(mbox) Adding cc: %s from line '%s'\n",
- $1, $_) unless $quiet;
+ printf("Adding cc: %s from From: header\n",
+ $1) unless $quiet;
push @cc, $1;
}
elsif (/^To:\s+(.*)$/i) {
foreach my $addr (parse_address_line($1)) {
- printf("(mbox) Adding to: %s from line '%s'\n",
- $addr, $_) unless $quiet;
+ printf("Adding to: %s from To: header\n",
+ $addr) unless $quiet;
push @to, $addr;
}
}
@@ -1498,8 +1498,8 @@ foreach my $t (@files) {
} else {
next if ($suppress_cc{'cc'});
}
- printf("(mbox) Adding cc: %s from line '%s'\n",
- $addr, $_) unless $quiet;
+ printf("Adding cc: %s from Cc: header\n",
+ $addr) unless $quiet;
push @cc, $addr;
}
}
@@ -1532,8 +1532,8 @@ foreach my $t (@files) {
# So let's support that, too.
$input_format = 'lots';
if (@cc == 0 && !$suppress_cc{'cc'}) {
- printf("(non-mbox) Adding cc: %s from line '%s'\n",
- $_, $_) unless $quiet;
+ printf("Adding cc: %s from Cc: header\n",
+ $_) unless $quiet;
push @cc, $_;
} elsif (!defined $subject) {
$subject = $_;
@@ -1555,8 +1555,8 @@ foreach my $t (@files) {
next if $suppress_cc{'bodycc'} and $what =~ /Cc/i;
}
push @cc, $c;
- printf("(body) Adding cc: %s from line '%s'\n",
- $c, $_) unless $quiet;
+ printf("Adding cc: %s from Signed-off-by trailer\n",
+ $c) unless $quiet;
}
}
close $fh;
@@ -1660,7 +1660,7 @@ sub recipients_cmd {
$address = sanitize_address($address);
next if ($address eq $sender and $suppress_cc{'self'});
push @addresses, $address;
- printf("($prefix) Adding %s: %s from: '%s'\n",
+ printf("Adding %s: %s from: '%s'\n",
$what, $address, $cmd) unless $quiet;
}
close $fh
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index 7fdc876..9b1e56f 100755
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
@@ -150,9 +150,9 @@ test_expect_success $PREREQ 'Verify commandline' '
test_expect_success $PREREQ 'setup expect' "
cat >expected-show-all-headers <<\EOF
0001-Second.patch
-(mbox) Adding cc: A <author@example.com> from line 'From: A <author@example.com>'
-(mbox) Adding cc: One <one@example.com> from line 'Cc: One <one@example.com>, two@example.com'
-(mbox) Adding cc: two@example.com from line 'Cc: One <one@example.com>, two@example.com'
+Adding cc: A <author@example.com> from From: header
+Adding cc: One <one@example.com> from Cc: header
+Adding cc: two@example.com from Cc: header
Dry-OK. Log says:
Server: relay.example.com
MAIL FROM:<from@example.com>
@@ -503,9 +503,9 @@ test_expect_success $PREREQ 'second message is patch' '
test_expect_success $PREREQ 'setup expect' "
cat >expected-suppress-sob <<\EOF
0001-Second.patch
-(mbox) Adding cc: A <author@example.com> from line 'From: A <author@example.com>'
-(mbox) Adding cc: One <one@example.com> from line 'Cc: One <one@example.com>, two@example.com'
-(mbox) Adding cc: two@example.com from line 'Cc: One <one@example.com>, two@example.com'
+Adding cc: A <author@example.com> from From: header
+Adding cc: One <one@example.com> from Cc: header
+Adding cc: two@example.com from Cc: header
Dry-OK. Log says:
Server: relay.example.com
MAIL FROM:<from@example.com>
@@ -555,9 +555,9 @@ test_expect_success $PREREQ 'sendemail.cc set' '
test_expect_success $PREREQ 'setup expect' "
cat >expected-suppress-sob <<\EOF
0001-Second.patch
-(mbox) Adding cc: A <author@example.com> from line 'From: A <author@example.com>'
-(mbox) Adding cc: One <one@example.com> from line 'Cc: One <one@example.com>, two@example.com'
-(mbox) Adding cc: two@example.com from line 'Cc: One <one@example.com>, two@example.com'
+Adding cc: A <author@example.com> from From: header
+Adding cc: One <one@example.com> from Cc: header
+Adding cc: two@example.com from Cc: header
Dry-OK. Log says:
Server: relay.example.com
MAIL FROM:<from@example.com>
@@ -587,10 +587,10 @@ test_expect_success $PREREQ 'sendemail.cc unset' '
test_expect_success $PREREQ 'setup expect' "
cat >expected-suppress-cccmd <<\EOF
0001-Second.patch
-(mbox) Adding cc: A <author@example.com> from line 'From: A <author@example.com>'
-(mbox) Adding cc: One <one@example.com> from line 'Cc: One <one@example.com>, two@example.com'
-(mbox) Adding cc: two@example.com from line 'Cc: One <one@example.com>, two@example.com'
-(body) Adding cc: C O Mitter <committer@example.com> from line 'Signed-off-by: C O Mitter <committer@example.com>'
+Adding cc: A <author@example.com> from From: header
+Adding cc: One <one@example.com> from Cc: header
+Adding cc: two@example.com from Cc: header
+Adding cc: C O Mitter <committer@example.com> from Signed-off-by: trailer
Dry-OK. Log says:
Server: relay.example.com
MAIL FROM:<from@example.com>
@@ -647,10 +647,10 @@ test_expect_success $PREREQ '--suppress-cc=all' '
test_expect_success $PREREQ 'setup expect' "
cat >expected-suppress-body <<\EOF
0001-Second.patch
-(mbox) Adding cc: A <author@example.com> from line 'From: A <author@example.com>'
-(mbox) Adding cc: One <one@example.com> from line 'Cc: One <one@example.com>, two@example.com'
-(mbox) Adding cc: two@example.com from line 'Cc: One <one@example.com>, two@example.com'
-(cc-cmd) Adding cc: cc-cmd@example.com from: './cccmd'
+Adding cc: A <author@example.com> from From: header
+Adding cc: One <one@example.com> from Cc: header
+Adding cc: two@example.com from Cc: header
+Adding cc: cc-cmd@example.com from: './cccmd'
Dry-OK. Log says:
Server: relay.example.com
MAIL FROM:<from@example.com>
@@ -681,9 +681,9 @@ test_expect_success $PREREQ '--suppress-cc=body' '
test_expect_success $PREREQ 'setup expect' "
cat >expected-suppress-body-cccmd <<\EOF
0001-Second.patch
-(mbox) Adding cc: A <author@example.com> from line 'From: A <author@example.com>'
-(mbox) Adding cc: One <one@example.com> from line 'Cc: One <one@example.com>, two@example.com'
-(mbox) Adding cc: two@example.com from line 'Cc: One <one@example.com>, two@example.com'
+Adding cc: A <author@example.com> from From: header
+Adding cc: One <one@example.com> from Cc: header
+Adding cc: two@example.com from Cc: header
Dry-OK. Log says:
Server: relay.example.com
MAIL FROM:<from@example.com>
@@ -712,9 +712,9 @@ test_expect_success $PREREQ '--suppress-cc=body --suppress-cc=cccmd' '
test_expect_success $PREREQ 'setup expect' "
cat >expected-suppress-sob <<\EOF
0001-Second.patch
-(mbox) Adding cc: A <author@example.com> from line 'From: A <author@example.com>'
-(mbox) Adding cc: One <one@example.com> from line 'Cc: One <one@example.com>, two@example.com'
-(mbox) Adding cc: two@example.com from line 'Cc: One <one@example.com>, two@example.com'
+Adding cc: A <author@example.com> from From: header
+Adding cc: One <one@example.com> from Cc: header
+Adding cc: two@example.com from Cc: header
Dry-OK. Log says:
Server: relay.example.com
MAIL FROM:<from@example.com>
@@ -744,10 +744,10 @@ test_expect_success $PREREQ '--suppress-cc=sob' '
test_expect_success $PREREQ 'setup expect' "
cat >expected-suppress-bodycc <<\EOF
0001-Second.patch
-(mbox) Adding cc: A <author@example.com> from line 'From: A <author@example.com>'
-(mbox) Adding cc: One <one@example.com> from line 'Cc: One <one@example.com>, two@example.com'
-(mbox) Adding cc: two@example.com from line 'Cc: One <one@example.com>, two@example.com'
-(body) Adding cc: C O Mitter <committer@example.com> from line 'Signed-off-by: C O Mitter <committer@example.com>'
+Adding cc: A <author@example.com> from From: header
+Adding cc: One <one@example.com> from Cc: header
+Adding cc: two@example.com from Cc: header
+Adding cc: C O Mitter <committer@example.com> from Signed-off-by: trailer
Dry-OK. Log says:
Server: relay.example.com
MAIL FROM:<from@example.com>
@@ -778,8 +778,8 @@ test_expect_success $PREREQ '--suppress-cc=bodycc' '
test_expect_success $PREREQ 'setup expect' "
cat >expected-suppress-cc <<\EOF
0001-Second.patch
-(mbox) Adding cc: A <author@example.com> from line 'From: A <author@example.com>'
-(body) Adding cc: C O Mitter <committer@example.com> from line 'Signed-off-by: C O Mitter <committer@example.com>'
+Adding cc: A <author@example.com> from From: header
+Adding cc: C O Mitter <committer@example.com> from Signed-off-by: trailer
Dry-OK. Log says:
Server: relay.example.com
MAIL FROM:<from@example.com>
--
2.8.3
next prev parent reply other threads:[~2016-06-07 14:02 UTC|newest]
Thread overview: 96+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-23 19:30 [RFC-PATCH 0/2] send-email: new --quote-mail option Tom Russello
2016-05-23 19:30 ` [RFC-PATCH 1/2] send-email: new option to quote an email and reply to Tom Russello
2016-05-23 19:55 ` Eric Wong
2016-05-23 20:07 ` Matthieu Moy
2016-05-23 22:10 ` Samuel GROOT
2016-05-24 12:43 ` Samuel GROOT
2016-05-24 12:49 ` Matthieu Moy
2016-05-24 22:30 ` Aaron Schrab
2016-05-25 0:04 ` Tom Russello
2016-05-24 21:23 ` Eric Wong
2016-05-23 20:00 ` Matthieu Moy
2016-05-24 23:31 ` Samuel GROOT
2016-05-25 6:29 ` Matthieu Moy
2016-05-25 15:40 ` Junio C Hamano
2016-05-25 16:56 ` Matthieu Moy
2016-05-25 18:15 ` Junio C Hamano
2016-05-25 18:31 ` Matthieu Moy
2016-05-26 0:08 ` Samuel GROOT
2016-05-27 9:06 ` Matthieu Moy
2016-05-23 19:30 ` [RFC-PATCH 2/2] t9001: adding --quote-mail option test Tom Russello
2016-05-23 20:05 ` Matthieu Moy
2016-05-23 19:38 ` [RFC-PATCH 0/2] send-email: new --quote-mail option Matthieu Moy
2016-05-23 19:56 ` Samuel GROOT
2016-05-27 17:11 ` [RFC-PATCH v2 0/2] send-email: new --quote-email option Tom Russello
2016-05-27 17:11 ` [RFC-PATCH v2 1/2] send-email: quote-email populates the fields Tom Russello
2016-05-28 14:35 ` Matthieu Moy
2016-05-29 23:38 ` Tom Russello
2016-05-27 17:11 ` [RFC-PATCH v2 2/2] send-email: quote-email quotes the message body Tom Russello
2016-05-28 15:01 ` Matthieu Moy
2016-05-29 11:41 ` Tom Russello
2016-06-07 14:01 ` [PATCH v3 0/6] send-email: cleaner tests and quote email Tom Russello
2016-06-07 14:01 ` [PATCH v3 1/6] t9001: non order-sensitive file comparison Tom Russello
2016-06-08 1:07 ` Junio C Hamano
2016-06-08 8:23 ` Samuel GROOT
2016-06-08 16:09 ` Junio C Hamano
2016-06-08 16:46 ` Samuel GROOT
2016-06-09 6:01 ` Matthieu Moy
2016-06-13 22:21 ` Samuel GROOT
2016-06-09 5:51 ` Matthieu Moy
2016-06-09 8:15 ` Tom Russello
2016-06-07 14:01 ` [PATCH v3 2/6] t9001: check email address is in Cc: field Tom Russello
2016-06-09 5:55 ` Matthieu Moy
2016-06-13 22:23 ` Samuel GROOT
2016-06-07 14:01 ` Tom Russello [this message]
2016-06-08 8:36 ` [PATCH v3 3/6] t9001: shorten send-email's output Eric Wong
2016-06-08 9:30 ` Samuel GROOT
2016-06-09 6:03 ` Matthieu Moy
2016-06-07 14:01 ` [PATCH v3 4/6] send-email: create email parser subroutine Tom Russello
2016-06-07 14:05 ` [PATCH v3 5/6] send-email: --in-reply-to=<file> populates the fields Tom Russello
2016-06-07 14:05 ` [PATCH v3 6/6] send-email: add option --cite to quote the message body Tom Russello
2016-06-08 13:01 ` (unknown), Samuel GROOT
2016-06-08 13:01 ` [PATCH v4 1/6] t9001: non order-sensitive file comparison Samuel GROOT
2016-06-08 14:22 ` Remi Galan Alfonso
2016-06-08 14:29 ` Samuel GROOT
2016-06-08 16:56 ` Junio C Hamano
2016-06-08 19:21 ` Samuel GROOT
2016-06-08 17:17 ` Junio C Hamano
2016-06-08 19:19 ` Samuel GROOT
2016-06-08 13:01 ` [PATCH v4 2/6] t9001: check email address is in Cc: field Samuel GROOT
2016-06-08 17:34 ` Junio C Hamano
2016-06-08 19:23 ` Samuel GROOT
2016-06-08 13:01 ` [PATCH v4 3/6] send-email: shorten send-email's output Samuel GROOT
2016-06-08 17:37 ` Junio C Hamano
2016-06-08 19:18 ` Samuel GROOT
2016-06-08 19:33 ` Junio C Hamano
2016-06-08 19:40 ` Samuel GROOT
2016-06-09 6:17 ` Matthieu Moy
2016-06-13 22:19 ` Samuel GROOT
2016-06-08 13:01 ` [PATCH v4 4/6] send-email: create email parser subroutine Samuel GROOT
2016-06-08 17:58 ` Junio C Hamano
2016-06-08 18:12 ` Eric Sunshine
2016-06-08 18:32 ` Junio C Hamano
2016-06-08 19:26 ` Samuel GROOT
2016-06-08 19:31 ` Junio C Hamano
2016-06-08 19:42 ` Samuel GROOT
2016-06-08 19:30 ` Samuel GROOT
2016-06-08 20:13 ` Eric Sunshine
2016-06-08 20:17 ` Junio C Hamano
2016-06-08 23:54 ` Samuel GROOT
2016-06-09 0:21 ` Eric Wong
2016-06-13 22:18 ` Samuel GROOT
2016-06-13 22:47 ` Eric Wong
2016-06-14 22:18 ` Samuel GROOT
2016-06-09 6:51 ` Eric Sunshine
2016-06-13 22:15 ` Samuel GROOT
2016-06-08 19:36 ` Samuel GROOT
2016-06-08 20:38 ` Eric Wong
2016-06-08 13:07 ` [PATCH v4 5/6] send-email: --in-reply-to=<file> populate header fields Samuel GROOT
2016-06-08 18:23 ` Junio C Hamano
2016-06-14 22:26 ` Samuel GROOT
2016-06-09 9:45 ` Matthieu Moy
2016-06-14 22:35 ` Samuel GROOT
2016-06-08 13:08 ` [PATCH v4 6/6] send-email: add option --cite to quote the message body Samuel GROOT
2016-06-09 11:49 ` Matthieu Moy
2016-06-14 22:53 ` Samuel GROOT
2016-06-15 22:21 ` Tom Russello
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160607140148.23242-4-tom.russello@grenoble-inp.org \
--to=tom.russello@grenoble-inp.org \
--cc=aaron@schrab.com \
--cc=e@80x24.org \
--cc=erwan.mathoniere@grenoble-inp.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jordan.de-gea@grenoble-inp.org \
--cc=matthieu.moy@grenoble-inp.fr \
--cc=samuel.groot@grenoble-inp.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).