The apply backend implements --whitespace=fix through git apply, which
prevents users from combining it with interactive rebases and other
merge-backend features. Teach merge replay to compare whitespace-normalized
records, then fix only lines introduced by replay using the path's
whitespace rules. Keep other whitespace actions on the apply backend.
Tests cover interactive replay, attributes, existing whitespace, added
files, end-of-file handling, and unsupported actions.
Closes gitgitgadget/git#1472
Alessio Attilio (4):
xdiff: support transformed records in merge matching
merge-ort: fix whitespace in replayed changes
rebase: route whitespace fixes through the selected backend
rebase: test whitespace fixes with the merge backend
Documentation/git-rebase.adoc | 6 +-
builtin/rebase.c | 55 +++++++-
contrib/completion/git-completion.bash | 2 +-
merge-ll.c | 182 ++++++++++++++++++++++++-
merge-ll.h | 5 +
merge-ort.c | 52 +++++++
merge-ort.h | 1 +
t/t3417-rebase-whitespace-fix.sh | 163 ++++++++++++++++++++++
t/t3422-rebase-incompatible-options.sh | 17 ++-
xdiff/xdiff.h | 4 +
xdiff/xmerge.c | 16 +--
xdiff/xprepare.c | 57 ++++++--
xdiff/xtypes.h | 2 +
xdiff/xutils.c | 14 ++
xdiff/xutils.h | 2 +
15 files changed, 547 insertions(+), 31 deletions(-)
base-commit: acba8bf9753134d9bde89f94369f775838a8c5fe
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2511%2Fkairosci%2Fds%2Frebase-whitespace-fix-merge-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2511/kairosci/ds/rebase-whitespace-fix-merge-v1
Pull-Request: https://github.com/git/git/pull/2511
--
gitgitgadget