From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id B805A1F5AE for ; Fri, 26 Jun 2020 14:43:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727090AbgFZOnE (ORCPT ); Fri, 26 Jun 2020 10:43:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725792AbgFZOnD (ORCPT ); Fri, 26 Jun 2020 10:43:03 -0400 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A940BC03E979 for ; Fri, 26 Jun 2020 07:43:03 -0700 (PDT) Received: by mail-wm1-x341.google.com with SMTP id o2so9624241wmh.2 for ; Fri, 26 Jun 2020 07:43:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=reply-to:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=TCAm8dxzkuhbFVqrgYOKHl2CChmW4ucFZK8tvQ5jo48=; b=FVc00k+nMH8uwcdahN+U+XhiYW9MdhO6TnWZPHK2AflHyUqabj8u8WgGvfjyWOADsH SvXFfssKTt3t/bO2fDWtm4VOPy59pPaFT5d1mGlr5rSvdTWsbL0KbvD9Np6hcGCR4L/1 WpS4bIvkJkQsBYCF/xZaLvwmRqI0yw4F/4ewq5YmLjS+ZpH87jFQpRlbz955FIbPf0Yd 0Mrp/k+o/yR8mb+ocpeeyjJCdbNuKqMp3JCjA8KQ7aN+dzis+rBtI9v+nmp1QzVhA9j1 mJe5/FB5VPkzK4Kov8dG/qB2L+VlKmcEqexRI+fubY7wdvYYtrMmOw2WKnx74MKM2MA/ g+qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:subject:to:cc:references:from :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=TCAm8dxzkuhbFVqrgYOKHl2CChmW4ucFZK8tvQ5jo48=; b=A/OVPCy7XZUcYyODNcnOp92NXEzy60akBzCZVOQnVPEPJXySkxgWnHJ+NGiPktrY37 6PQ/a/hhdteH0zwa7B4YSZGKboEMLfFQ1Jq1hxdAgnHJyESYdiOJqd8cdhMzIboG+xtE /gZGJa6J1IWQ4if/En0FC9n97r8sxT1uQI9qtsNnQME9AQxZHYsIKFchR1UsWexxzBqS 2IW48bU0sBcKaxKms10mOmobyKmFxue8Qy7NGkHeEzT/fdUZDLtoJabn8sysJkF/yGuU 7BzQ6ibScFktvrBDSyCR2dUEBNosY21hbWNDfTBKQlf/nVPZovP54Z/2jpR2RlwTYtxB H2MA== X-Gm-Message-State: AOAM533thZzHh20zywNQbCnNB1Ne2x3clEh3MiqpReMqUNY9t38Vzfyo Y1RvNm0r++41wO4+qdAV2p59urwA X-Google-Smtp-Source: ABdhPJw01m/CwLLzqRMxFzwHeFdaZIxN7sUpcpkdF5OWdTvlWuSUYWkW4fp5UFFOiw2ncCISUbI9Vg== X-Received: by 2002:a1c:55c4:: with SMTP id j187mr3736866wmb.120.1593182581969; Fri, 26 Jun 2020 07:43:01 -0700 (PDT) Received: from [192.168.1.240] (226.20.198.146.dyn.plus.net. [146.198.20.226]) by smtp.gmail.com with ESMTPSA id t205sm17744444wmt.8.2020.06.26.07.43.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 26 Jun 2020 07:43:01 -0700 (PDT) Reply-To: phillip.wood@dunelm.org.uk Subject: Re: [PATCH v5 1/5] rebase -i: add --ignore-whitespace flag To: =?UTF-8?B?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= , Phillip Wood Cc: Johannes Schindelin , Junio C Hamano , Elijah Newren , Rohit Ashiwal , Alban Gruin , Git Mailing List References: <20200407141125.30872-1-phillip.wood123@gmail.com> <20200626095528.117524-1-phillip.wood123@gmail.com> <20200626095528.117524-2-phillip.wood123@gmail.com> <20200626133714.GB12504@danh.dev> From: Phillip Wood Message-ID: <78c32f2d-3af6-1514-51a3-1110531cbb88@gmail.com> Date: Fri, 26 Jun 2020 15:43:00 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <20200626133714.GB12504@danh.dev> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Hi Danh On 26/06/2020 14:37, Đoàn Trần Công Danh wrote: > 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=