summaryrefslogtreecommitdiff
path: root/t/t4049-diff-histogram.sh
diff options
context:
space:
mode:
authorTay Ray Chuan <rctay89@gmail.com>2011-07-12 06:10:25 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-07-12 16:29:20 (GMT)
commit8c912eea94a2138e8bc608f7c390eb0b313effb0 (patch)
tree244d67eaac3f77d6645bdf69b87e23a90dbb2485 /t/t4049-diff-histogram.sh
parent46c8f2988dc9a6012babd5833a6245ceff214483 (diff)
downloadgit-8c912eea94a2138e8bc608f7c390eb0b313effb0.zip
git-8c912eea94a2138e8bc608f7c390eb0b313effb0.tar.gz
git-8c912eea94a2138e8bc608f7c390eb0b313effb0.tar.bz2
teach --histogram to diff
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>
Diffstat (limited to 't/t4049-diff-histogram.sh')
-rwxr-xr-xt/t4049-diff-histogram.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t4049-diff-histogram.sh b/t/t4049-diff-histogram.sh
new file mode 100755
index 0000000..fd3e86a
--- /dev/null
+++ b/t/t4049-diff-histogram.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+test_description='histogram diff algorithm'
+
+. ./test-lib.sh
+. "$TEST_DIRECTORY"/lib-diff-alternative.sh
+
+test_diff_frobnitz "histogram"
+
+test_diff_unique "histogram"
+
+test_done