From patchwork Wed Apr 29 10:25:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phillip Wood X-Patchwork-Id: 11516623 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6D3B213B2 for ; Wed, 29 Apr 2020 10:26:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4A1872074A for ; Wed, 29 Apr 2020 10:26:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="O2nIesxj" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726798AbgD2K0s (ORCPT ); Wed, 29 Apr 2020 06:26:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726535AbgD2K0r (ORCPT ); Wed, 29 Apr 2020 06:26:47 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B197C03C1AE for ; Wed, 29 Apr 2020 03:26:47 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id x18so1865952wrq.2 for ; Wed, 29 Apr 2020 03:26:47 -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:reply-to :mime-version:content-transfer-encoding; bh=7jikg6kcfQDMm1pKvjxqLMkW7J0NyIpZlOhIaI+F4hs=; b=O2nIesxjXQWQt4oV27So8PozmXKKV0nnFMAPqa8ngpT0BoOS1BX6v7ZwnONKKKMxT2 uX0QXDE53rOlNFMBfhTnUgKm/zFBlEVYELpGP9OPU5o2yRRdKr/bixy9mp/tarZkyJHs n3MpabiqrsFO2L6eLXLqK4ifNCDzqsd8+fxnUB6U0hvaVyPkhEEvmK/Uc3N8zgmTC5e/ Hi4P1DVcv4hJ0BIeF1JnhTA5Mr9Onc7v35ECuMypgXsePMGzlvI91G+Z1WcGHdA+T/rn 23j3+XHFQ4K0pKAot6fTAgJRb7lTQ8R7z5r+/M++YP4GqIewDdOBjVULUTV8+JJ+au1z FBZQ== 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:reply-to:mime-version:content-transfer-encoding; bh=7jikg6kcfQDMm1pKvjxqLMkW7J0NyIpZlOhIaI+F4hs=; b=YvD/ewF4I6ez5OX2X0csRLAGFucOryst545IqTNlRVy1wAVRwHtXdwianQ3wvhrWmV vUZdJaYaU6ec+Cdl/CJudnxns6/UzEItWVVs33j2ymhzAcym7qEe8c6M6q/dT0Aq5PNp uOQZJdimMQ+vjurXMSHIlqUb+tdGVxeJgxu1Q4ivsFdyuxGFcQ51Y+ATuFgHFwxzqcsM lL9sEFibnQmT+h1ekp43DeF1LLkcQxovS1UoTzv0IxXkj5NgcAHH/fF+rV2bV8bWNjYj LkZfbywTknorKueoRx3ahdGb+y69nODfiG7W3k3UDkuk9tllSs3wosz8cbZ0VSYc58hd VPTQ== X-Gm-Message-State: AGi0Pua2R/dPeG8PgCUXB0YL8Ct59sWcjOrrSVcac24zKzqmztiMet8L YLAyv/0fyQyELN5dt1yOAv8= X-Google-Smtp-Source: APiQypJz1FzVv4h9Vx1mqwQOOztq9K46E4SsLdh55o02Xnntq+e/7+x9PWTO/ZIvzWYGA7sMXUKY+A== X-Received: by 2002:adf:f34f:: with SMTP id e15mr39178847wrp.275.1588156005926; Wed, 29 Apr 2020 03:26:45 -0700 (PDT) Received: from localhost.localdomain (155.20.198.146.dyn.plus.net. [146.198.20.155]) by smtp.gmail.com with ESMTPSA id c1sm30718196wrc.4.2020.04.29.03.26.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Apr 2020 03:26:45 -0700 (PDT) From: Phillip Wood To: Johannes Schindelin , Junio C Hamano , Elijah Newren , Rohit Ashiwal , Git Mailing List Cc: Phillip Wood Subject: [PATCH v2 1/5] rebase -i: add --ignore-whitespace flag Date: Wed, 29 Apr 2020 11:25:17 +0100 Message-Id: <20200429102521.47995-2-phillip.wood123@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200429102521.47995-1-phillip.wood123@gmail.com> References: <20200407141125.30872-1-phillip.wood123@gmail.com> <20200429102521.47995-1-phillip.wood123@gmail.com> Reply-To: Phillip Wood MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Rohit Ashiwal Rebase is implemented with two different backends - 'apply' and 'merge' each of which support a different set of options. In particuar the apply backend supports a number of options implemented by 'git am' that are not available to the merge backend. As part of an on going effort to remove the apply backend this patch adds support for the --ignore-whitespace option to the merge backend. This option treats lines with only whitespace changes as unchanged and is implemented in the merge backend by translating it to -Xignore-space-change. Signed-off-by: Rohit Ashiwal Signed-off-by: Phillip Wood --- Documentation/git-rebase.txt | 12 +++- builtin/rebase.c | 19 ++++-- t/t3422-rebase-incompatible-options.sh | 1 - t/t3436-rebase-more-options.sh | 86 ++++++++++++++++++++++++++ 4 files changed, 111 insertions(+), 7 deletions(-) create mode 100755 t/t3436-rebase-more-options.sh diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index f7a6033607..d060c143e6 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -422,8 +422,16 @@ your branch contains commits which were dropped, this option can be used with `--keep-base` in order to drop those commits from your branch. --ignore-whitespace:: + Behaves differently depending on which backend is selected. ++ +apply backend: When applying a patch, ignore changes in whitespace in +context lines. ++ +merge backend: Treat lines with only whitespace changes as unchanged +when merging. + --whitespace=