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.7 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 EA1611F55B for ; Thu, 21 May 2020 10:15:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728566AbgEUKPW (ORCPT ); Thu, 21 May 2020 06:15:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728093AbgEUKPR (ORCPT ); Thu, 21 May 2020 06:15:17 -0400 Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92C96C061A0E for ; Thu, 21 May 2020 03:15:17 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id g12so4904921wrw.1 for ; Thu, 21 May 2020 03:15:17 -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=N0xchTTpZuGoj5CNYMesXVaiHP6iN2cvcKuNE6Hpq866cuWabuVpWLie2iT5EmGxrc XxmUJMJP2zytqNqc7o7hRVKp/TTJKrIperVXX2IaabzN7r7AePFGcIVe/HWLn8v6BFE1 c6l9mRv0cOBFnj2X0azLB9VNA7BG5hwvfC1YU37/2O51YwmEc6lbZZ9PJoF3djBgcxkb tCNdi913rxf5us4khamQUrVR/5h48r7h+SibP/7N+rntU8Krih2cpdW0azD3nCA60FTq NFL+CCNE1/SI47LlEgA3f40SRgWCvzJbmPSuOzvsrvInyzsRQPiqMel9g/p4eRV9a9ei 7CcA== 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=sksSZ9I3V9MG6M8kqwDCeiSJ6pfUTZTX/StQS3TSX5HSggpirUb9ENXXLmkrYumlwf paT7sLxupg91e0/JLHESYWXHHN8vOTNm5dPc5Zzs6LM12goj599ekEhrjejPsWrf7oAX jHh1R2knhzrtwCQRjn6tIq7ZQylpPNGxKzfC1hqKwovUmfviGDqbNwAn64bXiJhjMCTi E8TlMJVpvFggJ411rTKbb/g+a9uO4xVvVtXijYTLUJj72OEIe6dde1qZmsM2O3+PQCN1 M9G5j6BordgkdAKsw5DRB9HtQy0vJbqmuEicDW6wRXL1pa0U+BZeuJm9Ag6kDE2oSzGF iJvg== X-Gm-Message-State: AOAM532pqXO8hpHkE8nq9aA2pHr9446lIjtbmWe+tkgxDzVAq5u31h3T EvtA4ldMWpBYd480KY9RP9c= X-Google-Smtp-Source: ABdhPJzyV3YS6SZyY1vRA2KjcPSI3pZ5kQ9hJMysrfKp6se9mXXkfPZGVajScYQ+fTluYsR4CI/zSg== X-Received: by 2002:a5d:6584:: with SMTP id q4mr8472777wru.12.1590056116219; Thu, 21 May 2020 03:15:16 -0700 (PDT) Received: from localhost.localdomain (226.20.198.146.dyn.plus.net. [146.198.20.226]) by smtp.gmail.com with ESMTPSA id y5sm656219wrs.63.2020.05.21.03.15.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2020 03:15:15 -0700 (PDT) From: Phillip Wood To: Johannes Schindelin , Junio C Hamano , Elijah Newren , Rohit Ashiwal , Alban Gruin , Git Mailing List Cc: Phillip Wood Subject: [PATCH v3 1/5] rebase -i: add --ignore-whitespace flag Date: Thu, 21 May 2020 11:14:51 +0100 Message-Id: <20200521101455.63484-2-phillip.wood123@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200521101455.63484-1-phillip.wood123@gmail.com> References: <20200407141125.30872-1-phillip.wood123@gmail.com> <20200521101455.63484-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=