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=-7.1 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 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 9CD25C433DF for ; Fri, 26 Jun 2020 13:37:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 65DF2207D8 for ; Fri, 26 Jun 2020 13:37:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OwN0PaJA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728697AbgFZNhU (ORCPT ); Fri, 26 Jun 2020 09:37:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726013AbgFZNhS (ORCPT ); Fri, 26 Jun 2020 09:37:18 -0400 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D3B6C03E979 for ; Fri, 26 Jun 2020 06:37:18 -0700 (PDT) Received: by mail-pf1-x444.google.com with SMTP id 207so4472652pfu.3 for ; Fri, 26 Jun 2020 06:37:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=/8iApe4NsCugbUXrHEbu/0ytd3UcrKfMAytDFnftshQ=; b=OwN0PaJATmHnunbXkRys2XW4ujznTwxjdS1a1Z1A88oztHSG/nGYrGHDlhzhY451ZA 2hN2KwUm2OPkBJWxGq41VlaeyNX3+gCtv7bIyaRXMDfSATITMMAU9/pCe7EZ+hh+Yxap YKIv7yMbvbo4ID6f4xPoL1+Gz0Xzu4r/om7blpscYLfLLdqRVE70z1SGfkyeowtBfDqd ROFX6JTkxErcG6v/IBEkZj3mM8aOxN4UiJAaofrkLb2S0UXQqCrDAVpIKcjBeFj+szSR /pE3hbCSW0UdCRpZAPY3myzZIcbwJBGKwKROOwRpBif/uu4T82IsbnYAmqqoTT13e01f M1wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=/8iApe4NsCugbUXrHEbu/0ytd3UcrKfMAytDFnftshQ=; b=sGBjCz2CHgnXhQpg3AwVHgRwJOWOofaFZu1oYZw6bNxOQtBYu5Daa27A8gQkm4jmFT I7uH+9HqzD+mdAZzOgCslbU6uYv3pWassAPoNGbfz48szHykQ+YIQnzIIGZU/Nvze0Vw nFbV6U+cL3CPN3UNE4zk8T9wwXizRiPQiLRzRIol6mfK1e0o1Apj5nQcmXGMnVnosn/D 03aKAkcPDsiDdGB0HteQD0NUpQ2hS5FszaNO/MmX9hAP+8omA9oFqLutHfRNH1GLVIZw FpHmza9ZlPuNBatdmtTknKVQ9WO+f8xLt9IY2m1h0WzSIDzg0mgkL6FR+R4YHH2kUX9q k8QA== X-Gm-Message-State: AOAM533eX0yqizQb7foMzcTHcD0QWsrXXUGFyx5gqvWduN5+llPRF3FC 9pp4u4wVNqQ3dctHMJcwKmU= X-Google-Smtp-Source: ABdhPJyDV9Naakhs6QNkitj1vTxUi2e4djUrdFyBoWkKRo7FlmFJtalBIclMW8tUDiujB8yFuXe4uw== X-Received: by 2002:a63:dd42:: with SMTP id g2mr2930249pgj.442.1593178637614; Fri, 26 Jun 2020 06:37:17 -0700 (PDT) Received: from localhost ([2402:800:6375:9968:2644:616c:71ad:c7e6]) by smtp.gmail.com with ESMTPSA id o11sm2691539pjr.25.2020.06.26.06.37.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2020 06:37:16 -0700 (PDT) Date: Fri, 26 Jun 2020 20:37:14 +0700 From: =?utf-8?B?xJBvw6BuIFRy4bqnbiBDw7RuZw==?= Danh To: Phillip Wood Cc: Johannes Schindelin , Junio C Hamano , Elijah Newren , Rohit Ashiwal , Alban Gruin , Git Mailing List Subject: Re: [PATCH v5 1/5] rebase -i: add --ignore-whitespace flag Message-ID: <20200626133714.GB12504@danh.dev> References: <20200407141125.30872-1-phillip.wood123@gmail.com> <20200626095528.117524-1-phillip.wood123@gmail.com> <20200626095528.117524-2-phillip.wood123@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200626095528.117524-2-phillip.wood123@gmail.com> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On 2020-06-26 10:55:24+0100, Phillip Wood wrote: > From: Rohit Ashiwal > > Rebase is implemented with two different backends - 'apply' and > 'merge' each of which support a different set of options. In > particular the apply backend supports a number of options implemented > by 'git am' that are not implemented in the merge backend. This means > that the available options are different depending on which backend is > used which is confusing. 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 | 16 +++++-- > t/t3422-rebase-incompatible-options.sh | 1 - > t/t3436-rebase-more-options.sh | 60 ++++++++++++++++++++++++++ > 4 files changed, 90 insertions(+), 6 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=