[GSoC,0/1] rebase -i: support --ignore-whitespace
mbox series

Message ID 20190712185015.20585-1-rohit.ashiwal265@gmail.com
Headers show
Series
  • rebase -i: support --ignore-whitespace
Related show

Message

Rohit Ashiwal July 12, 2019, 6:50 p.m. UTC
[cc'ing Phillip Wood, Martin Ă…gren and Dscho; they might be interested]

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 indicated merge mechanism
to treat lines with only whitespace changes as unchanged.

NB: am's --ignore-space-change (also aliased --ignore-whitespace; see git-apply's
description) not only share the same name with diff's --ignore-space-change and
merge's -Xignore-space-change, but the similarity in naming appears to have been
intentional with am's --ignore-space-change being designed to have the same
functionality (see e.g. the commit messages for f008cef ("Merge branch
'jc/apply-ignore-whitespace'", 2014-06-04) and 4e5dd04 ("merge-recursive: options
to ignore whitespace changes", 2010-08-26)).

For the most part, these options do provide the same behaviour. However, there
are some edge cases where both apply's --ignore-space-change and merge's
-Xignore-space-change fall short of optimal behaviour, and that too in different
ways. Fixing these differences in edge cases is left for future work.

Rohit Ashiwal (1):
  rebase -i: add --ignore-whitespace flag

 Documentation/git-rebase.txt            |  9 +++-
 builtin/rebase.c                        | 24 +++++++--
 sequencer.h                             |  1 +
 t/t3422-rebase-incompatible-options.sh  |  1 -
 t/t3431-rebase-options-compatibility.sh | 66 +++++++++++++++++++++++++
 5 files changed, 95 insertions(+), 6 deletions(-)
 create mode 100755 t/t3431-rebase-options-compatibility.sh