]> git.ipfire.org Git - thirdparty/git.git/commit - diff.c
diff --color-moved-ws: handle blank lines
authorPhillip Wood <phillip.wood@dunelm.org.uk>
Fri, 23 Nov 2018 11:16:58 +0000 (11:16 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 10 Jan 2019 18:38:29 +0000 (10:38 -0800)
commit0cd51e9d05e65608126c30fbb65a0cdd197cd570
tree1a0d842134bc7dfc2a866614b69af2c419ba9568
parent21536d077f4b7b8a249f1fc894dafc38f06cef0f
diff --color-moved-ws: handle blank lines

When using --color-moved-ws=allow-indentation-change allow lines with
the same indentation change to be grouped across blank lines. For now
this only works if the blank lines have been moved as well, not for
blocks that have just had their indentation changed.

This completes the changes to the implementation of
--color-moved=allow-indentation-change. Running

  git diff --color-moved=allow-indentation-change v2.18.0 v2.19.0

now takes 5.0s. This is a saving of 41% from 8.5s for the optimized
version of the previous implementation and 66% from the original which
took 14.6s.

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Reviewed-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff.c
t/t4015-diff-whitespace.sh