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 X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 2F47FC433E1 for ; Wed, 27 May 2020 17:34:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0EE322075A for ; Wed, 27 May 2020 17:34:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ufqSpndt" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390941AbgE0ReK (ORCPT ); Wed, 27 May 2020 13:34:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388017AbgE0ReJ (ORCPT ); Wed, 27 May 2020 13:34:09 -0400 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3BA3C03E97D for ; Wed, 27 May 2020 10:34:08 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id u12so242917wmd.3 for ; Wed, 27 May 2020 10:34:08 -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=NJmFAE8A9rgEGyh7Pifl8cs2YJ1/clxENMtMNq/R85k=; b=ufqSpndtUIhCVP40HTbxquKV/6sYI0AXFS1Bnr9D+7LqcByIvNuSyAt7Jeq7cNuFdl anywfvaS3jVRnCfHBhNK1QJKORl9sVsL9G9TTNufU28bXOrvis0knuQm8bc7SXuEjSAZ JsxM2Ike17UzfgoeUYyCks3l0PPnXPapLmGUA3Tsq6SeYN0yFPwXP0SXZ22HJVf3U/+B 79sMYGyTpyxSweytIdU/SaFkxHwgUwrdhTJXiOoypPYMten+rqy+6HGT1zuvZbjwv0wW PTAFzFHvj4IeLtoBALo7qclTbDsYjYFDwXhN90Jnl2h5aw3gMUHtQS1g5exe1/wqSJBj v7iA== 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=NJmFAE8A9rgEGyh7Pifl8cs2YJ1/clxENMtMNq/R85k=; b=p2gzz1g7B2a2VOsL1NPrB/JJqqaTD6vtDdkGO6wA40QQM+dcYyOneskY51URPI4B5s xETV3yFKQfgXq/0i7jsapgwPTkh9ATyX5+Ht63LlpDVyWc3yCXctpyjKuKjt6UDyMkx2 Y1v+hYk1+S0rbJ4V7eulqjiPWYoCi0U3BUs/CQ4MWfQz0y2uageMmENLePwAhmkOuOo5 H2PLBtenGc2jP9XEyWRSqb6RomgLjWYt/egiaVNg77vc4gtzpZIeXsgVJoDZmeNYe9bk 0IWOr+KfGIQsrY2wT//7fKFq/iUqvaPl7XaccFTL2VMvhJ9GI4v8mVfw/9Y/FQAbeK0C 0Rqw== X-Gm-Message-State: AOAM530Dotb6tnGHKWixXtQ4kVUSS1+X67kctWinyMoCeWVMSkU0LPNj XByrxVgkRBxaxpAUoz9cF/g= X-Google-Smtp-Source: ABdhPJy7GntUOuCxOzoW540jl4AwPlDiVrguUPd0ykqMEGWXPbMJZeDdMquhxrWDV8S8YcqZKls8fg== X-Received: by 2002:a1c:a1c5:: with SMTP id k188mr5514266wme.41.1590600847478; Wed, 27 May 2020 10:34:07 -0700 (PDT) Received: from localhost.localdomain (226.20.198.146.dyn.plus.net. [146.198.20.226]) by smtp.gmail.com with ESMTPSA id h196sm3524807wme.22.2020.05.27.10.34.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 May 2020 10:34:06 -0700 (PDT) From: Phillip Wood To: Johannes Schindelin , Junio C Hamano , Elijah Newren , Rohit Ashiwal , =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= , Alban Gruin , Git Mailing List Cc: Phillip Wood Subject: [PATCH v4 1/5] rebase -i: add --ignore-whitespace flag Date: Wed, 27 May 2020 18:33:52 +0100 Message-Id: <20200527173356.47364-2-phillip.wood123@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200527173356.47364-1-phillip.wood123@gmail.com> References: <20200407141125.30872-1-phillip.wood123@gmail.com> <20200527173356.47364-1-phillip.wood123@gmail.com> Reply-To: Phillip Wood MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 | 19 +++++- builtin/rebase.c | 19 ++++-- t/t3422-rebase-incompatible-options.sh | 1 - t/t3436-rebase-more-options.sh | 86 ++++++++++++++++++++++++++ 4 files changed, 118 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..b003784f01 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -422,8 +422,23 @@ 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:: + Ignore whitespace differences when trying to reconcile +differences. Currently, each backend implements an approximation of +this behavior: ++ +apply backend: When applying a patch, ignore changes in whitespace in +context lines. Unfortunately, this means that if the "old" lines being +replaced by the patch differ only in whitespace from the existing +file, you will get a merge conflict instead of a successful patch +application. ++ +merge backend: Treat lines with only whitespace changes as unchanged +when merging. Unfortunately, this means that any patch hunks that were +intended to modify whitespace and nothing else will be dropped, even +if the other side had no changes that conflicted. + --whitespace=