From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4D6E8C433EF for ; Mon, 22 Nov 2021 06:46:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232466AbhKVGuC (ORCPT ); Mon, 22 Nov 2021 01:50:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232383AbhKVGuB (ORCPT ); Mon, 22 Nov 2021 01:50:01 -0500 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93D3BC061714 for ; Sun, 21 Nov 2021 22:46:55 -0800 (PST) Received: by mail-wm1-x32e.google.com with SMTP id g191-20020a1c9dc8000000b0032fbf912885so12672274wme.4 for ; Sun, 21 Nov 2021 22:46:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:in-reply-to:references:from:date:subject:mime-version :content-transfer-encoding:fcc:to:cc; bh=NlM7hMcSYyZ4wuTr9eICUuvxg21IuQSXmqPCWX3uykc=; b=E3EnzchhSarzYN90OYXB+pD00Ji+QzIXsyuf0LH3R62DA4M/KbID6yYJTUKCFW/rNm ZbmpEZfcp6X/TMDY39dLuNfK2PZNa99KcLpKh5InQ1SG7BAy7/1vRMXXdi+yaxsj0mIp HDa0gnDTjBSIVRCWrIhIUhevnk5jpFtq8f0BH9F0kECNzlxmUjCFqJpdwKEnt6F8skgg zhxYqqUv9HSGpY0mlwGcDYinxIrRfi8I+R+7knY+A/IiKaNUlQt93kIRUKr5pcPWl9yA sAunFrY0zCrOSrvQq2OIzAbR+jk+Fw6/qlabmUAYkD9+zvjpxUz3jtHvTSMhmAPSZVIp xDFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:mime-version:content-transfer-encoding:fcc:to:cc; bh=NlM7hMcSYyZ4wuTr9eICUuvxg21IuQSXmqPCWX3uykc=; b=6/VnVi0Ts8SWBKU8KgNxXpOKPt080Geb8KUzVpiKak/qA2qVHdVLK14DtyD9wFN5Tz kTntG12tE17hY7Rwv8MLd0x/laGD0+deSmdnGIWz9ZUWQUsNFjnS025qrpltdkEvfaRP htiWxdcbl048d8g+bjSaYfp01jQXGOeKNkj+xu2lAcMmPDJWnjsEwOsf/fujrQhNRCRI +kudiW947FqLUxiGjN/le2nEP+4f+7OqpjSUXRk/c+aLyTp9UfLjycM5g5Z5v09Cse4D O1QtBHM6R5tFGITrMk81fxt4zUuV4W2jSrBOwu78WGsXP79B7+9mWNCPeD8dMPlBM9y1 QbWA== X-Gm-Message-State: AOAM531OhB8Jt5Q3uGn7T4cZIW9ZHZBYfT3LriaBBpsGrao0BZwizl7V yzOD+os4DaZV+ghczJ65Yurvu1AzySI= X-Google-Smtp-Source: ABdhPJwRM1wS1pEfICKJflBTO9FsS2qihMDZVibgQFAEMj7JELPs0DJqVYNm2VsLjdIr4ILDICiDmg== X-Received: by 2002:a1c:21d7:: with SMTP id h206mr25825787wmh.60.1637563613139; Sun, 21 Nov 2021 22:46:53 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id n15sm22463847wmq.38.2021.11.21.22.46.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Nov 2021 22:46:52 -0800 (PST) Message-Id: In-Reply-To: References: From: "Aleen via GitGitGadget" Date: Mon, 22 Nov 2021 06:46:49 +0000 Subject: [PATCH v8 0/2] am: support --empty=(die|drop|keep) option to handle empty patches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fcc: Sent To: git@vger.kernel.org Cc: =?UTF-8?Q?Ren=C3=A9?= Scharfe , Phillip Wood , Aleen =?UTF-8?Q?=E5=BE=90=E6=B2=9B=E6=96=87?= , Aleen Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Since that git has supported the --always option for the git-format-patch command to create a patch with an empty commit message, git-am should support applying and committing with empty patches. ---------------------------------------------------------------------------- Changes since v1: 1. add a case when not passing the --always option. 2. rename the --always option to --allow-empty. ---------------------------------------------------------------------------- Changes since v2: 1. rename the --allow-empty option to --empty-commit. 2. introduce three different strategies (die|skip|asis) when trying to record empty patches as empty commits. ---------------------------------------------------------------------------- Changes since v3: 1. generate the missed file for test cases. 2. grep -f cannot be used under Mac OS. ---------------------------------------------------------------------------- Changes since v4: 1. rename the --empty-commit option to --empty. 2. rename three different strategies (die|skip|asis) to die, drop and keep correspondingly. ---------------------------------------------------------------------------- Changes since v5: 1. throw an error when passing --empty option without value. ---------------------------------------------------------------------------- Changes since v6: 1. update code according to the seen branch 2. fix wrong document of git-am ---------------------------------------------------------------------------- Aleen (2): doc: git-format-patch: describe the option --always am: support --empty=