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: AS53758 23.128.96.0/24 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 D969A1F9E0 for ; Wed, 29 Apr 2020 10:26:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726790AbgD2K0s (ORCPT ); Wed, 29 Apr 2020 06:26:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726355AbgD2K0r (ORCPT ); Wed, 29 Apr 2020 06:26:47 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5C5AC03C1AD for ; Wed, 29 Apr 2020 03:26:46 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id t14so1818725wrw.12 for ; Wed, 29 Apr 2020 03:26:46 -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=T0c6W/iiHt4eRAs0K/ttKtgTp6fC1eA1edkB0sFP2/k=; b=NQAQHp+Jn08lasHKs3KD1w+zaTdsdoXSELZzCCcCbzLW6txKhxHFOjGwn1TIlNveAq oOlgiZkwG94eTGJWjtRGSbklycp6b56W3WElF8XsjKjFo4BRGuyfDiINEB+6szEJTGr2 Lfqdzq3OxhL0NxDP5tp/smyeVjQGU+vQBMGCvsSdt2XfiMrFwIpI2GvoaObdv3BTiWWo jWwdKOj5SuRm0EGgGDQVTINEal9rJi0PuBV2VP1CbDYJftOt55EkVeqVHnPieH5dZMmZ OHGD87BYR72s1O6p9txFdvNAMksJaVFRNrBeV1H9vHUe4LjzvmVPB8eS5iwXxnYFDiT9 GAsw== 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=T0c6W/iiHt4eRAs0K/ttKtgTp6fC1eA1edkB0sFP2/k=; b=f4xedTmyUhGFPTX5EWxczLqhSoQ8UbH+tadLKDOwr4Tuu/NshQyJocqtLrZYfmCKAC l8e2narnLRrbZciEUnB2XAqZPR1aIbaVI4BHELc6rI30hjGg7zkEzwLH1XOA//rBlEia HP4nNplC9TVtVXvjSmZ2S2/EtTIC6D8+jUgAL0hiTEfHfTBiAO0R+9BPmnw9bLAx3AvJ 6W6jXnKwWg7Jyh/OOFxjUYnXUeK/QQszdaBolsp/VRwFmov4Tx1cqtuVpTmZ1pLjujjC v54d2F5KSPDHD66QKRoksa1iHILWdbUsP7jy1JAdos2gB3FWupapcbIiYwKW/BWpKSCW 99og== X-Gm-Message-State: AGi0PubCm20VNrXGos2vRCNYklfmd48/eic7IZqxy019l2GhpOr6qAQS ADYy7MTGggmbW7chXfI5OXk= X-Google-Smtp-Source: APiQypKPv7F4Hja+2p92aXp/XW+snqeCP1/PKEivKr6PlDLB7BcZtgzTyFSmC9ke5rItubR/GP1DsQ== X-Received: by 2002:adf:8284:: with SMTP id 4mr38372205wrc.6.1588156004861; Wed, 29 Apr 2020 03:26:44 -0700 (PDT) Received: from localhost.localdomain (155.20.198.146.dyn.plus.net. [146.198.20.155]) by smtp.gmail.com with ESMTPSA id c1sm30718196wrc.4.2020.04.29.03.26.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Apr 2020 03:26:44 -0700 (PDT) From: Phillip Wood To: Johannes Schindelin , Junio C Hamano , Elijah Newren , Rohit Ashiwal , Git Mailing List Cc: Phillip Wood Subject: [PATCH v2 0/5] cleanup ra/rebase-i-more-options Date: Wed, 29 Apr 2020 11:25:16 +0100 Message-Id: <20200429102521.47995-1-phillip.wood123@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200407141125.30872-1-phillip.wood123@gmail.com> References: <20200407141125.30872-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: Phillip Wood I've rebased Rohit's patches on master and reworked them with my fixups from v1. I've renamed the test file that was causing a problem (as you'll see I wasn't feeling very inspired when I came up with the name) and changed some tests from using rebase -i to rebase -m as suggested by Elijah. I've updated the last patch to test both --reset-author and --ignore-author. There's a range-diff below between ra/rebase-i-more-options and these patches though I'm not sure how useful it is in practice. Phillip Wood (2): rebase -i: support --committer-date-is-author-date rebase -i: support --ignore-date Rohit Ashiwal (3): rebase -i: add --ignore-whitespace flag sequencer: rename amend_author to author_to_free rebase: add --reset-author-date Documentation/git-rebase.txt | 26 ++- builtin/rebase.c | 46 ++++-- sequencer.c | 111 ++++++++++++- sequencer.h | 2 + t/t3422-rebase-incompatible-options.sh | 2 - t/t3436-rebase-more-options.sh | 209 +++++++++++++++++++++++++ 6 files changed, 371 insertions(+), 25 deletions(-) create mode 100755 t/t3436-rebase-more-options.sh 1: ba51d2fb24 ! 1: 5ef315240a rebase -i: add --ignore-whitespace flag @@ Metadata ## Commit message ## rebase -i: add --ignore-whitespace flag - 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. + 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: Junio C Hamano + Signed-off-by: Phillip Wood ## Documentation/git-rebase.txt ## -@@ Documentation/git-rebase.txt: If either or --root is given on the command line, then the - default is `--no-fork-point`, otherwise the default is `--fork-point`. +@@ Documentation/git-rebase.txt: 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. ++apply backend: When applying a patch, ignore changes in whitespace in ++context lines. ++ -+'interactive' backend: Treat lines with only whitespace changes as -+unchanged for the sake of a three-way merge. ++merge backend: Treat lines with only whitespace changes as unchanged ++when merging. + --whitespace=