Commit 0cd51e9
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>1 parent 21536d0 commit 0cd51e9
2 files changed
+68
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
794 | 794 | | |
795 | 795 | | |
796 | 796 | | |
| 797 | + | |
| 798 | + | |
797 | 799 | | |
798 | 800 | | |
799 | | - | |
| 801 | + | |
800 | 802 | | |
801 | 803 | | |
802 | 804 | | |
| |||
820 | 822 | | |
821 | 823 | | |
822 | 824 | | |
823 | | - | |
824 | | - | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
825 | 837 | | |
826 | 838 | | |
827 | 839 | | |
| |||
836 | 848 | | |
837 | 849 | | |
838 | 850 | | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
839 | 856 | | |
840 | 857 | | |
841 | 858 | | |
| |||
879 | 896 | | |
880 | 897 | | |
881 | 898 | | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
882 | 903 | | |
883 | 904 | | |
884 | 905 | | |
| |||
890 | 911 | | |
891 | 912 | | |
892 | 913 | | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
893 | 921 | | |
894 | 922 | | |
895 | 923 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1901 | 1901 | | |
1902 | 1902 | | |
1903 | 1903 | | |
| 1904 | + | |
1904 | 1905 | | |
1905 | 1906 | | |
1906 | 1907 | | |
1907 | 1908 | | |
| 1909 | + | |
| 1910 | + | |
| 1911 | + | |
| 1912 | + | |
| 1913 | + | |
| 1914 | + | |
| 1915 | + | |
| 1916 | + | |
| 1917 | + | |
1908 | 1918 | | |
1909 | 1919 | | |
1910 | 1920 | | |
| |||
1918 | 1928 | | |
1919 | 1929 | | |
1920 | 1930 | | |
| 1931 | + | |
| 1932 | + | |
| 1933 | + | |
| 1934 | + | |
1921 | 1935 | | |
1922 | 1936 | | |
1923 | 1937 | | |
| 1938 | + | |
| 1939 | + | |
| 1940 | + | |
| 1941 | + | |
| 1942 | + | |
1924 | 1943 | | |
1925 | 1944 | | |
1926 | 1945 | | |
| |||
1937 | 1956 | | |
1938 | 1957 | | |
1939 | 1958 | | |
1940 | | - | |
| 1959 | + | |
| 1960 | + | |
| 1961 | + | |
| 1962 | + | |
| 1963 | + | |
| 1964 | + | |
| 1965 | + | |
| 1966 | + | |
| 1967 | + | |
| 1968 | + | |
1941 | 1969 | | |
1942 | 1970 | | |
1943 | 1971 | | |
| |||
1948 | 1976 | | |
1949 | 1977 | | |
1950 | 1978 | | |
1951 | | - | |
1952 | | - | |
1953 | | - | |
| 1979 | + | |
| 1980 | + | |
| 1981 | + | |
| 1982 | + | |
| 1983 | + | |
| 1984 | + | |
| 1985 | + | |
| 1986 | + | |
1954 | 1987 | | |
1955 | 1988 | | |
1956 | 1989 | | |
| |||
0 commit comments