From: Phillip Wood Date: Wed, 29 Apr 2020 10:25:16 GMT Subject: [PATCH v2 0/5] cleanup ra/rebase-i-more-options Message-ID: <20200429102521.47995-1-phillip.wood123@gmail.com> In-Reply-To: <20200407141125.30872-1-phillip.wood123@gmail.com> 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=