From patchwork Fri Nov 1 13:59:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rohit Ashiwal X-Patchwork-Id: 11223165 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DAF6E912 for ; Fri, 1 Nov 2019 14:01:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A66C22085B for ; Fri, 1 Nov 2019 14:01:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RwNlxEDP" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727904AbfKAOBS (ORCPT ); Fri, 1 Nov 2019 10:01:18 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:43766 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727746AbfKAOBO (ORCPT ); Fri, 1 Nov 2019 10:01:14 -0400 Received: by mail-pf1-f196.google.com with SMTP id 3so7135261pfb.10 for ; Fri, 01 Nov 2019 07:01:14 -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=p7bpcDnxGzy/LG3P52CeD4g+UnPNksZuV1SvP4TCebI=; b=RwNlxEDPlNi1qSAb+hI+33xSBvl9K+4rW2rlNvk860Mhw7WCcJH70540S5movoDnlg RohxuyzXwdjHx/4LjOVBXu0TqlSXKkskcfpcfXiRIsi9rmyiluWb9GIXTLfLyxWhKoY9 RW72f49Au7OnDQ2DGDwn+u+degSm34qjovr8H2OzZh/KZHDOCoC5w58TqQ4XYY4G8ZY0 ZUsbUdfNAaA1ET1emQW9dwG1RmZUFiI1altYbT+nZyzUxbkHY+ECfWd2x9MJMyGejT7W UvLsVDz948HbR17uhaPOIRpC5vdykVw5qIUdp1aXtlyvs1+apWh2Tsnw7WzDPR8JbhOv 8wRg== 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=p7bpcDnxGzy/LG3P52CeD4g+UnPNksZuV1SvP4TCebI=; b=PXBmoNYo2N0gmRIRzrQ8xn+1x1wgmo7aSioQR4PsZigvWhxJZLIiFZt3lK9bUVS4Z3 4uBkvariloKIQTRjhlIypHKmLuh0jlUW5yHqtLJTDTnm976m4tukCRlIsibtMtCJoYMb Qrp9RRzupVeXXREPRX1YIRH+BdooS0jI4Xk42qash0R08T3oRZcavDBSx3GGoRtsy8ww X000wBc3Akg5Gk85FIGqzC8D815Tfxt52Yh0cBrXtijcPp+neYyS9D3zdYvoUIVt0WT8 dOLZB97W6K+YBqQM892t+K2/wAnq7agfzewgJYJ621PXo50+Pq6hCuUBK3k+FOTWFOMg OFjA== X-Gm-Message-State: APjAAAWvj7QGUmiov6/TS9x3zyILuHZ/WvQ2wmrSh0Ku9ljPOTYNpm7O Enl8H+/Fe0bKV/3OKGmg4+s= X-Google-Smtp-Source: APXvYqzuJzkQgO4KENy/fU0yWGK3kCD974w3jm5SGrVaBseugIBoyAX6SIUx4nV+1HTS7F59RATgww== X-Received: by 2002:a63:d4c:: with SMTP id 12mr13436471pgn.127.1572616873820; Fri, 01 Nov 2019 07:01:13 -0700 (PDT) Received: from ar135.mshome.net ([103.37.200.214]) by smtp.gmail.com with ESMTPSA id z4sm7806816pjt.20.2019.11.01.07.01.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Nov 2019 07:01:13 -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 v5 1/6] rebase -i: add --ignore-whitespace flag Date: Fri, 1 Nov 2019 19:29:58 +0530 Message-Id: <20191101140003.13960-2-rohit.ashiwal265@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191101140003.13960-1-rohit.ashiwal265@gmail.com> References: <20190806173638.17510-1-rohit.ashiwal265@gmail.com> <20191101140003.13960-1-rohit.ashiwal265@gmail.com> MIME-Version: 1.0 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 | 12 ++++- builtin/rebase.c | 19 ++++++-- t/t3422-rebase-incompatible-options.sh | 1 - t/t3433-rebase-options-compatibility.sh | 65 +++++++++++++++++++++++++ 4 files changed, 90 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 639a4179d1..b4de299e6f 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -393,8 +393,16 @@ 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:: + 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=