From patchwork Fri Jul 12 18:50:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rohit Ashiwal X-Patchwork-Id: 11042651 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 D37A914DB for ; Fri, 12 Jul 2019 18:53:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C3B6B2841F for ; Fri, 12 Jul 2019 18:53:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B6220283C9; Fri, 12 Jul 2019 18:53:05 +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 A613B2847A for ; Fri, 12 Jul 2019 18:53:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727277AbfGLSxD (ORCPT ); Fri, 12 Jul 2019 14:53:03 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:40963 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726976AbfGLSxD (ORCPT ); Fri, 12 Jul 2019 14:53:03 -0400 Received: by mail-pg1-f196.google.com with SMTP id q4so4916230pgj.8 for ; Fri, 12 Jul 2019 11:53:02 -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=bgZoNjXT2jLiYsDLKbJ8uK6VzGSVPA2Dc4G8M7zu75M=; b=dkHie4N7VaIogjnn4rI1E8Ckezmxz9kKIknqogl+7i+i4CKEdlOBzpNUj5fhF/CXNb LROI4niHUW6KUCo+iV0VEFo0w3YqPZuXC7L4opSI3dTKSF8ZrYxVkseVQG3RCXG8OJc/ 8FF6fMm9DVx5XhxiOOn73sbPiPB5KzMsIHb465ulwZb+YFEHp2weJD3Ezum2HwdeImQc o6/GxS01qcyoWFM5OyIufSEA+zQvNE5ELIJpb5VZf5l0qMuJZtSId5i+7PgGPh4sMs5q XXeeBjSrI5LAfYzBF/j+gkR6Tm58KuE4Plgy5ZsZNJpzlogh45vgGb7X1a3IwZSwKXVi kWuw== 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=bgZoNjXT2jLiYsDLKbJ8uK6VzGSVPA2Dc4G8M7zu75M=; b=Ec9o6+FtZGfz3bwtbAtn/ZuvOZls6lmzwOhVOsfucB1RnYAfjIt2yHNZ5GwYdOPVtp TCdg+yWbRriN0RVQVn+zau7oBbujGVxu9JJva+DZkiDl+iRkm0w7GJdXEStgZj8D4kFX 0p0wSYb6Z4VAe0sm8OlthArWaLNLeB1b9MBbSQjIaYmCTyH7wyttInsKCCpXgONN09HN 6ZbNLLm9bymvpgPSNSyiPO+FcRgp3h02pXStDmvS1OX3k9q2IYBAEVYJAiQToD4siLUG 8DZ3bMIRPOuApQr4/2I7dG5mz6BHlR3Eo3WlXCj15h99JdwCgBwb68a2Wqc93OP75N79 Gq1Q== X-Gm-Message-State: APjAAAUSbZY9HNG9yyyc/sC/nNb1/fs/bInMfR7ktxCIeD/t0IHL1wh3 GpxE0iddnntyN8hEzjjlrytraxxKXw0= X-Google-Smtp-Source: APXvYqyKxPzQwwOXhvRWuxHQIobU77GBT+bVq5rh7vM+a9vaHdhPmOR9DJrpAbHL+QuyH/TjY+eL1g== X-Received: by 2002:a63:194f:: with SMTP id 15mr12923423pgz.382.1562957581803; Fri, 12 Jul 2019 11:53:01 -0700 (PDT) Received: from ar135.iitr.ac.in ([103.37.200.218]) by smtp.gmail.com with ESMTPSA id v4sm8475244pgf.20.2019.07.12.11.52.59 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 12 Jul 2019 11:53:01 -0700 (PDT) From: Rohit Ashiwal To: git@vger.kernel.org, gitster@pobox.com Cc: phillip.wood123@gmail.com, martin.agren@gmail.com, Johannes.Schindelin@gmx.de, Rohit Ashiwal Subject: [GSoC][PATCH 1/1] rebase -i: add --ignore-whitespace flag Date: Sat, 13 Jul 2019 00:20:15 +0530 Message-Id: <20190712185015.20585-2-rohit.ashiwal265@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190712185015.20585-1-rohit.ashiwal265@gmail.com> References: <20190712185015.20585-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 | 24 +++++++-- sequencer.h | 1 + t/t3422-rebase-incompatible-options.sh | 1 - t/t3431-rebase-options-compatibility.sh | 66 +++++++++++++++++++++++++ 5 files changed, 95 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 5e4e92764..eda52ed82 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=