From patchwork Sun May 9 17:12:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= X-Patchwork-Id: 12246497 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DD033C433B4 for ; Sun, 9 May 2021 17:12:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BE9CE6140A for ; Sun, 9 May 2021 17:12:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229958AbhEIRNj (ORCPT ); Sun, 9 May 2021 13:13:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229937AbhEIRNi (ORCPT ); Sun, 9 May 2021 13:13:38 -0400 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89F3AC061573 for ; Sun, 9 May 2021 10:12:34 -0700 (PDT) Received: by mail-pl1-x629.google.com with SMTP id 69so3378429plc.5 for ; Sun, 09 May 2021 10:12:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/cLMxAxOV2hm72x8Qm1t0yY9jrm5/t5nx1m8lVP3Z8E=; b=GcmmzQg0oypaHaXfYruKVPo/PlhvVKyU1dkC9CiL5XgMWndRVBJIcxG0HrQVJKRCDd ghq8hb9HGPT2xrYswBjgQ9I4kS5xEnhxRju1NOA7hZYrUOn1hCS+e5E1ZUTUJg2qJ5dw xY9/IT+XUG5jlTt5nIt8C1Qxjif8o40UgSF3viMDUY1fX9qB/KMsYfqRLpIh795JHBcN JoX60I01Y4sMJu2jkEeoWzK+l0RzF2Was/ZRL43ZjCC2EfApF0vwHUPtc+mfkwy4v/pl lk7mkubgzYChndJUjca7dPqddDYdZEyQqSad3/SPspwbsaKfVG/H2gfiwGsQ2b6BHwgQ Y3Yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/cLMxAxOV2hm72x8Qm1t0yY9jrm5/t5nx1m8lVP3Z8E=; b=n9u7qOs+6C99A6h+qlXgmiLF4qlNvf8yTycnL531pdqQhLK8kmJ1IRIAMJNUL32pyL PKY8dCMCa89vAo4lPruUkII1P5KQAQkzO6sTwY91CAgpAa2Bzzqq/WIgxtQ/AGvyopuQ K/ldBr5OkO14uAhZAaCa92J8qdsMB9WYuevm1aMDBExROJ7eH2d9eLcStgRFOa8yprwT Mg2urlmNCjEAbRhLCx3oXiY6QMUwlaZCQ3MTkVol9f6lqJS3+iC5zy5CmzJiXklSMll+ niPPP02zjtJVLs8Ovt3qBR2xNYELHAvNs8heAfS1cgMWSYYIDwISqoyvzcj4gLP0Wg8m wlbQ== X-Gm-Message-State: AOAM532MjW73+gATJJ4TVxplhFxxRqa/Xr5ZSblbB8uGboENlFJkSiE6 lbNea0gXlOaGC+Yfh/o/LCW5AlkVF7gosA== X-Google-Smtp-Source: ABdhPJy7inaX7RgHTFf2jdYm2dP/hYCowxSlcYOuAFMrnKAg/VuuD2OZQRHiOlNbqHzADDzOYnkrJg== X-Received: by 2002:a17:902:7444:b029:ed:5334:40b6 with SMTP id e4-20020a1709027444b02900ed533440b6mr20082541plt.35.1620580353825; Sun, 09 May 2021 10:12:33 -0700 (PDT) Received: from athena.localdomain ([2402:800:63b8:d379:85bd:c83a:4b40:cd9b]) by smtp.gmail.com with ESMTPSA id l126sm9249374pga.41.2021.05.09.10.12.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 May 2021 10:12:33 -0700 (PDT) From: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= To: git@vger.kernel.org Cc: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= , Junio C Hamano , "brian m. carlson" Subject: [PATCH v4 6/6] am: learn to process quoted lines that ends with CRLF Date: Mon, 10 May 2021 00:12:13 +0700 Message-Id: X-Mailer: git-send-email 2.31.1.448.g9c2f8508d1 In-Reply-To: References: <20210421013404.17383-1-congdanhqx@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org In previous changes, mailinfo has learnt to process lines that decoded from base64 or quoted-printable, and ends with CRLF. Let's teach "am" that new trick, too. Signed-off-by: Đoàn Trần Công Danh --- Documentation/git-am.txt | 4 ++ builtin/am.c | 51 ++++++++++++++++++++++++++ contrib/completion/git-completion.bash | 5 +++ mailinfo.h | 1 + t/t4258-am-quoted-cr.sh | 37 +++++++++++++++++++ t/t4258/mbox | 12 ++++++ 6 files changed, 110 insertions(+) create mode 100755 t/t4258-am-quoted-cr.sh create mode 100644 t/t4258/mbox diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt index decd8ae122..8714dfcb76 100644 --- a/Documentation/git-am.txt +++ b/Documentation/git-am.txt @@ -15,6 +15,7 @@ SYNOPSIS [--whitespace=