From: Phillip Wood Date: Tue, 20 Aug 2019 18:40:54 GMT Subject: Re: [PATCH v3 1/6] rebase -i: add --ignore-whitespace flag Message-ID: <98aeebc5-fceb-1ce8-9c27-d425c3f6e674@gmail.com> In-Reply-To: <20190820034536.13071-2-rohit.ashiwal265@gmail.com> Hi Rohit On 20/08/2019 04:45, Rohit Ashiwal wrote: > 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 | 13 ++++- > builtin/rebase.c | 22 +++++++-- > t/t3422-rebase-incompatible-options.sh | 1 - > t/t3433-rebase-options-compatibility.sh | 65 +++++++++++++++++++++++++ > 4 files changed, 94 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 6156609cf7..873eb5768c 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. > + Thanks for spelling out exactly what this does. I had not appreciated the difference before. Does this mean that if I have a branch with some whitespace cleanups I'll get different results if I rebase it with the sequencer compared to am? (I suspect from the description that the sequencer will simply ignore all my whitespace changes) I think this is ready if we can live with the difference - I'm not entirely convinced that adding an option with the same name and a different behavior is going to improve things though. Best Wishes Phillip > --whitespace=