summaryrefslogtreecommitdiff
path: root/xdiff/xhistogram.c
Commit message (Collapse)AuthorAgeFilesLines
* xdiff/xhistogram: drop need for additional variableTay Ray Chuan2011-08-081-5/+4
| | | | | | | | Having an additional variable (ptr) instead of changing line(1|2) and count(1|2) was for debugging purposes. Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* xdiff/xhistogram: rely on xdl_trim_ends()Tay Ray Chuan2011-08-081-27/+4
| | | | | | | | | Do away with reduce_common_start_end() and use xdf->dstart and xdf->dend set by xdl_trim_ends() that similarly tells us where the first unmatched line from the start and end occurs. Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* xdiff/xhistogram: rework handling of recursed resultsTay Ray Chuan2011-08-081-6/+9
| | | | | | | | | Previously we were over-complicating matters by trying to combine the recursed results. Now, terminate immediately if a recursive call failed and return its result. Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* teach --histogram to diffTay Ray Chuan2011-07-121-0/+384
Port JGit's HistogramDiff algorithm over to C. Rough numbers (TODO) show that it is faster than its --patience cousin, as well as the default Meyers algorithm. The implementation has been reworked to use structs and pointers, instead of bitmasks, thus doing away with JGit's 2^28 line limit. We also use xdiff's default hash table implementation (xdl_hash_bits() with XDL_HASHLONG()) for convenience. Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>