From patchwork Fri Nov 2 01:09:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Lindsay X-Patchwork-Id: 10664871 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B6954109C for ; Fri, 2 Nov 2018 01:17:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 98A3D2BF47 for ; Fri, 2 Nov 2018 01:17:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8AFF72BF5C; Fri, 2 Nov 2018 01:17:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2A75F2BF47 for ; Fri, 2 Nov 2018 01:17:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726116AbeKBKWW (ORCPT ); Fri, 2 Nov 2018 06:22:22 -0400 Received: from mail.aclindsay.com ([45.79.160.72]:50208 "EHLO mail.aclindsay.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726008AbeKBKWW (ORCPT ); Fri, 2 Nov 2018 06:22:22 -0400 X-Greylist: delayed 446 seconds by postgrey-1.27 at vger.kernel.org; Fri, 02 Nov 2018 06:22:22 EDT Received: from localhost.localdomain (cpe-65-190-6-212.nc.res.rr.com [65.190.6.212]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by mail.aclindsay.com (Postfix) with ESMTPSA id D26285E209; Thu, 1 Nov 2018 21:09:38 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=aclindsay.com; s=dkimselector; t=1541120979; bh=LVy5i+JNIcHUUrYO2CVY3jgmp9+0ubxsuTrzDxcZRuY=; h=From:To:Cc:Subject:Date; b=Tdgoa77DAwqr5IXuBkpdjx6tiuDkfk+yGDVYV6bmV1MT8cOQDOUO9ytzJYpi0K+rD zjrdoVCicbvTJH3P/dcAyG55bVqaTGSAEtJpr/xGgEo/I4L/YoecP0EPjwK9VQcrLe NsTkGJIUrzWxnGDce1dTNt4tt6nC6tA+3wV2YVqI= From: Aaron Lindsay To: git@vger.kernel.org Cc: "brian m . carlson" , Paolo Bonzini , Junio C Hamano , Aaron Lindsay Subject: [PATCH] send-email: Avoid empty transfer encoding header Date: Thu, 1 Nov 2018 21:09:34 -0400 Message-Id: <20181102010934.15473-1-aaron@aclindsay.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Signed-off-by: brian m. carlson --- 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;