From: brilliantov@inbox.ru
To: git@vger.kernel.org
Cc: Brilliantov Kirill Vladimirovich <brilliantov@inbox.ru>
Subject: [PATCH] git-send-email: Delete additional From message body
Date: Wed, 26 Aug 2015 12:25:20 +0300 [thread overview]
Message-ID: <1440581120-14156-1-git-send-email-brilliantov@inbox.ru> (raw)
Additional From added to message body if git-send-email run
with --from parameters
Signed-off-by: Brilliantov Kirill Vladimirovich <brilliantov@inbox.ru>
---
git-send-email.perl | 25 +++++++++++--------------
1 file changed, 11 insertions(+), 14 deletions(-)
diff --git a/git-send-email.perl b/git-send-email.perl
index b660cc2..92ec74a 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -1522,24 +1522,21 @@ foreach my $t (@files) {
$subject = quote_subject($subject, $auto_8bit_encoding);
}
- if (defined $sauthor and $sauthor ne $sender) {
- $message = "From: $author\n\n$message";
- if (defined $author_encoding) {
- if ($has_content_type) {
- if ($body_encoding eq $author_encoding) {
- # ok, we already have the right encoding
- }
- else {
- # uh oh, we should re-encode
- }
+ if (defined $author_encoding) {
+ if ($has_content_type) {
+ if ($body_encoding eq $author_encoding) {
+ # ok, we already have the right encoding
}
else {
- $xfer_encoding = '8bit' if not defined $xfer_encoding;
- $has_content_type = 1;
- push @xh,
- "Content-Type: text/plain; charset=$author_encoding";
+ # uh oh, we should re-encode
}
}
+ else {
+ $xfer_encoding = '8bit' if not defined $xfer_encoding;
+ $has_content_type = 1;
+ push @xh,
+ "Content-Type: text/plain; charset=$author_encoding";
+ }
}
if (defined $target_xfer_encoding) {
$xfer_encoding = '8bit' if not defined $xfer_encoding;
--
2.1.4
next reply other threads:[~2015-08-26 9:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-26 9:25 brilliantov [this message]
2015-08-26 22:38 ` [PATCH] git-send-email: Delete additional From message body Junio C Hamano
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1440581120-14156-1-git-send-email-brilliantov@inbox.ru \
--to=brilliantov@inbox.ru \
--cc=git@vger.kernel.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.
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 NNTP newsgroup(s).