git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] git-send-email: Delete additional From message body

From
Bbrilliantov@inbox.ru <brilliantov@inbox.ru>
Date
Aug 26, 2015, 09:25 UTC
Message-ID
<1440581120-14156-1-git-send-email-brilliantov@inbox.ru>

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: Junio C Hamano
Message 1 of 2 in “git-send-email: Delete additional From message body”
  1. git-send-email: Delete additional From message bodybrilliantov@inbox.ru, Aug 26, 2015
  2. Junio C HamanoAug 26, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.