From patchwork Thu Jul 18 18:55:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rohit Ashiwal X-Patchwork-Id: 11049417 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DBC8E6C5 for ; Thu, 18 Jul 2019 18:58:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CB25228885 for ; Thu, 18 Jul 2019 18:58:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BF91628891; Thu, 18 Jul 2019 18:58:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 160722888E for ; Thu, 18 Jul 2019 18:58:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727950AbfGRS62 (ORCPT ); Thu, 18 Jul 2019 14:58:28 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:40228 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727742AbfGRS62 (ORCPT ); Thu, 18 Jul 2019 14:58:28 -0400 Received: by mail-pl1-f195.google.com with SMTP id a93so14308198pla.7 for ; Thu, 18 Jul 2019 11:58:27 -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=guaafy32XvnL1S2/s+ft0Da25cmSkm/DyrtCotKMUSE=; b=r6kCjXqM3tu0fg37bbEDFJhsA4pbtgbZCmWALyppUQzymB4upqJNa+Qq2BqoQeen9K htsr3dYu6ASEumeoSQj17tWFN5HiLrwlQjmZ7dp9Z9pfjokmvXj3VL5IED8v9gw+PcNM 7y3CnlzGmNXTUvuJE4mxBczHvGYr9wyHvg9lBlB6aXjsM+rV9EL+QoFrcmuMcsLFQbYz NCiIT1FPeMzj29b40Qge//HEKU2VFlRInE4hPW3t5HzQJAxRiAgo3RVC3PytUM0bhmZg qeUaJ4dpPSs7ivd0txfU7z1bV6hTUzh9HS1EGUgSDRD7x7ytlgD5TFjc2daGk9P4diON 88gg== 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=guaafy32XvnL1S2/s+ft0Da25cmSkm/DyrtCotKMUSE=; b=d71bhR47+R55VCWexvbKNKV+SzvsWARuibFkzvChY8rztrXMgCWvWpg2RqUlX4u++Y Q3P/4JsZL62ZND4Z7k0B25gAHjaPkpXdGtSilqI3Ne3/NiGejy08FZEsn5L0YeM5ORNS G4pAYn1wtU+22reUoQmNN+S6drnEYoXLHreLbBZYVRz0IWcqUDduIunEV+QCxxYCH+W6 hSclKvQofZSTAo5mPDHmTMB2KcQdq9uKa21S+xfv8TTjU1NMOdLT40xuWiMraYjFGAD8 uI3JcBLAj+2paLv2zAoeY2HMXhIhJZU+4QanQaCVlpgKVpgOuY9ykyK5WtDdtNVdpPtL 6XBg== X-Gm-Message-State: APjAAAUBZ7wcMWbxIsdPbugkaSa9l/6RpbUrGsZrU2k+BT20S9fDFN3R iXkuzEwgLwV/TwujmwkPNgE= X-Google-Smtp-Source: APXvYqxGd32x7/y8gHjupZ5xsR9g6EuM3z+WZ6eI/1IFhon6UYU321ZuCdIHEXllhxVx8wAHqxuYHQ== X-Received: by 2002:a17:902:9a06:: with SMTP id v6mr50543720plp.71.1563476306882; Thu, 18 Jul 2019 11:58:26 -0700 (PDT) Received: from ar135.iitr.local ([27.63.78.254]) by smtp.gmail.com with ESMTPSA id f3sm45861671pfg.165.2019.07.18.11.58.22 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 18 Jul 2019 11:58:26 -0700 (PDT) From: Rohit Ashiwal To: Rohit Cc: Dscho , Git Mailing List , Junio , Martin , Phillip , Thomas , Elijah Subject: [GSoC][PATCH v2 1/1] rebase -i: add --ignore-whitespace flag Date: Fri, 19 Jul 2019 00:25:14 +0530 Message-Id: <20190718185514.20108-2-rohit.ashiwal265@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190718185514.20108-1-rohit.ashiwal265@gmail.com> References: <20190712185015.20585-1-rohit.ashiwal265@gmail.com> <20190718185514.20108-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 X-Virus-Scanned: ClamAV using ClamSMTP 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 | 9 +++- builtin/rebase.c | 26 ++++++++-- sequencer.h | 1 + t/t3422-rebase-incompatible-options.sh | 1 - t/t3431-rebase-options-compatibility.sh | 66 +++++++++++++++++++++++++ 5 files changed, 97 insertions(+), 6 deletions(-) create mode 100755 t/t3431-rebase-options-compatibility.sh diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index 5e4e927647..eda52ed824 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -371,8 +371,13 @@ 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:: + This flag is either passed to the 'git apply' program + (see linkgit:git-apply[1]), or to 'git merge' program + (see linkgit:git-merge[1]) as `-Xignore-space-change`, + depending on which backend is selected by other options. + --whitespace=