From ba51d2fb24b1a41b8cc15270a06f24c35c0fcf19 Mon Sep 17 00:00:00 2001 From: Rohit Ashiwal Date: Fri, 1 Nov 2019 19:29:58 +0530 Subject: 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. Signed-off-by: Rohit Ashiwal Signed-off-by: Junio C Hamano --- Documentation/git-rebase.txt | 12 +++++- builtin/rebase.c | 19 ++++++++-- t/t3422-rebase-incompatible-options.sh | 1 - t/t3433-rebase-options-compatibility.sh | 65 +++++++++++++++++++++++++++++++++ 4 files changed, 90 insertions(+), 7 deletions(-) create mode 100755 t/t3433-rebase-options-compatibility.sh diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index 5e4e927647..a70a5cab26 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -371,8 +371,16 @@ 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:: + Behaves differently depending on which backend is selected. ++ +'am' backend: When applying a patch, ignore changes in whitespace in +context lines if necessary. ++ +'interactive' backend: Treat lines with only whitespace changes as +unchanged for the sake of a three-way merge. + --whitespace=