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

[PATCH] send-email: Avoid empty transfer encoding header

From
ALAaron Lindsay <aaron@aclindsay.com>
Date
Nov 2, 2018, 01:09 UTC
Message-ID
<20181102010934.15473-1-aaron@aclindsay.com>

Fix a small bug introduced by "7a36987ff (send-email: add an auto option for transfer encoding, 2018-07-14)

I saw the following message when setting --transfer-encoding for a file
with the same encoding:
    $ git send-email --transfer-encoding=8bit example.patch
    Use of uninitialized value $xfer_encoding in concatenation (.) or string
    at /usr/lib/git-core/git-send-email line 1744.
Signed-off-by: Aaron Lindsay <aaron@aclindsay.com>
---
 git-send-email.perl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/git-send-email.perl b/git-send-email.perl
index 2be5dac33..39c15bcc8 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -1834,7 +1834,7 @@ sub apply_transfer_encoding {
 	my $from = shift;
 	my $to = shift;
 
-	return $message if ($from eq $to and $from ne '7bit');
+	return ($message, $to) if ($from eq $to and $from ne '7bit');
 
 	require MIME::QuotedPrint;
 	require MIME::Base64;
-- 
2.19.1
Next: brian m. carlson
Message 1 of 3 in “send-email: Avoid empty transfer encoding header”
  1. send-email: Avoid empty transfer encoding headerAaron Lindsay, Nov 2, 2018
  2. brian m. carlsonNov 2, 2018
  3. send-email: Avoid empty transfer encoding headerAaron Lindsay, Nov 2, 2018

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.