From: Phillip Wood Date: Wed, 29 Apr 2020 10:25:17 GMT Subject: [PATCH v2 1/5] rebase -i: add --ignore-whitespace flag Message-ID: <20200429102521.47995-2-phillip.wood123@gmail.com> In-Reply-To: <20200429102521.47995-1-phillip.wood123@gmail.com> From: Rohit Ashiwal 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: Phillip Wood --- Documentation/git-rebase.txt | 12 +++- builtin/rebase.c | 19 ++++-- t/t3422-rebase-incompatible-options.sh | 1 - t/t3436-rebase-more-options.sh | 86 ++++++++++++++++++++++++++ 4 files changed, 111 insertions(+), 7 deletions(-) create mode 100755 t/t3436-rebase-more-options.sh diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index f7a6033607..d060c143e6 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -422,8 +422,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. ++ +apply backend: When applying a patch, ignore changes in whitespace in +context lines. ++ +merge backend: Treat lines with only whitespace changes as unchanged +when merging. + --whitespace=