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-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.8 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,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id C270D1F461 for ; Tue, 20 Aug 2019 03:45:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728954AbfHTDpu (ORCPT ); Mon, 19 Aug 2019 23:45:50 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:42950 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728627AbfHTDpu (ORCPT ); Mon, 19 Aug 2019 23:45:50 -0400 Received: by mail-pl1-f193.google.com with SMTP id y1so1999257plp.9 for ; Mon, 19 Aug 2019 20:45:49 -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 :mime-version:content-transfer-encoding; bh=bfLkpI+MxJTsj1WksAPKdLj9fbvrvbTAEj39Xk+0BSw=; b=HFaxp6IQWDqLQ7bq5kDWEmxHO2A98VZGM8zhUqnm2YVdGpfq5boSm6PXI9fBRBxX+Z tS6TQ+mqXLCCrLhbu5mx+NVXxT1IEMS3H18EpkNP3xn3EvGEuqIY7h/vfOCfayOhWlGF 1PnGuky8YuyDyOfB+9TVny42N1AKY8jb4sKBD2HYBTfEc/MEAO03O0LWr3nOt0tarJyP DixUsQpvP1WGSsqHS6m2Z5JPPoVGaTg/yBAxVafiu7cppwLl3MptJI603A73qQJ/ht21 hDJhKohCXmn0mriy/CEB4LN55gkWTZCUbLmHKdhafHIh//qvcGhvaClfEKW9djVV3lQO LCKQ== 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:mime-version:content-transfer-encoding; bh=bfLkpI+MxJTsj1WksAPKdLj9fbvrvbTAEj39Xk+0BSw=; b=IoPKGUMwFnpAlK4TwEa1Dll4BRJ7eyDW8kKHOdSLN/xHhlPwSrBKJiu+kIJQlNU4Xc mwXJyRXPJOH66JeS03O37+dVSKPl0SZ2BcPiO9Q0urPIaWPhr93WId8RqL3zT5p2HVcS lD21Kws8NsnRT1f0ZxgyqZEQppWRyf5/Et+SpbCHlVm7oRCoKKWU18et2qzN/c8Zu3H4 NA61JOJ8yfU+mDnpkoevWVLbeAOZpnM6bMvUtpAZFT4rFy+KrUnSf8qRwdrIgMBZHEN2 Llymi4GG4++TVV+chPoBPo2f7bnckv7PFPdMIon1dwMWxnIE1mKYMKdG3KOBaP0uFyUd Z1rQ== X-Gm-Message-State: APjAAAV+R9Vo/pjOsUL2PROYujiHe6gv16hnLrlJJ6IoeKAQ32NwPcJD CyQb1BQfRG5GT8VI7Fr0fO3kSYqgqOs= X-Google-Smtp-Source: APXvYqz7z14lkQH1HrJ6cYy3MKkk4oA4pmYQnhh9MOH/Y7dLW1QN37gq8pKTniNRgDYymz2tNNowcw== X-Received: by 2002:a17:902:7c8a:: with SMTP id y10mr25595387pll.65.1566272749235; Mon, 19 Aug 2019 20:45:49 -0700 (PDT) Received: from ar135.iitr.ac.in ([103.37.200.227]) by smtp.gmail.com with ESMTPSA id v67sm30115686pfb.45.2019.08.19.20.45.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2019 20:45:48 -0700 (PDT) From: Rohit Ashiwal To: rohit.ashiwal265@gmail.com Cc: Johannes.Schindelin@gmx.de, git@vger.kernel.org, gitster@pobox.com, martin.agren@gmail.com, newren@gmail.com, phillip.wood123@gmail.com, t.gummerer@gmail.com Subject: [PATCH v3 1/6] rebase -i: add --ignore-whitespace flag Date: Tue, 20 Aug 2019 09:15:30 +0530 Message-Id: <20190820034536.13071-2-rohit.ashiwal265@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190820034536.13071-1-rohit.ashiwal265@gmail.com> References: <20190806173638.17510-1-rohit.ashiwal265@gmail.com> <20190820034536.13071-1-rohit.ashiwal265@gmail.com> 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 There are two backends available for rebasing, viz, the am and the interactive. Naturally, there shall be some features that are implemented in one but not in the other. One such flag is --ignore-whitespace which indicates merge mechanism to treat lines with only whitespace changes as unchanged. Wire the interactive rebase to also understand the --ignore-whitespace flag by translating it to -Xignore-space-change. Signed-off-by: Rohit Ashiwal --- Documentation/git-rebase.txt | 13 ++++- builtin/rebase.c | 22 +++++++-- t/t3422-rebase-incompatible-options.sh | 1 - t/t3433-rebase-options-compatibility.sh | 65 +++++++++++++++++++++++++ 4 files changed, 94 insertions(+), 7 deletions(-) create mode 100755 t/t3433-rebase-options-compatibility.sh diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index 6156609cf7..873eb5768c 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -371,8 +371,16 @@ If either or --root is given on the command line, then the default is `--no-fork-point`, otherwise the default is `--fork-point`. --ignore-whitespace:: + Behaves differently depending on which backend is selected. ++ +'am' backend: When applying a patch, ignore changes in whitespace in +context lines if necessary. ++ +'interactive' backend: Treat lines with only whitespace changes as +unchanged for the sake of a three-way merge. + --whitespace=