diff options
author | Stefan Beller <sbeller@google.com> | 2017-10-25 11:49:12 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-10-26 11:23:32 +0900 |
commit | 01be97c2b285e8ba377ba58385ef6ad2e7815c93 (patch) | |
tree | 83384828d61d6c06a418e45766a990eebc95ba6a /builtin/clone.c | |
parent | xdiff-interface: export comparing and hashing strings (diff) | |
download | tgif-01be97c2b285e8ba377ba58385ef6ad2e7815c93.tar.xz |
diff.c: get rid of duplicate implementation
The implementations in diff.c to detect moved lines needs to compare
strings and hash strings, which is implemented in that file, as well
as in the xdiff library.
Remove the rather recent implementation in diff.c and rely on the well
exercised code in the xdiff lib.
With this change the hash used for bucketing the strings for the moved
line detection changes from FNV32 (that is provided via the hashmaps
memhash) to DJB2 (which is used internally in xdiff). Benchmarks found
on the web[1] do not indicate that these hashes are different in
performance for readable strings.
[1] https://softwareengineering.stackexchange.com/questions/49550/which-hashing-algorithm-is-best-for-uniqueness-and-speed
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/clone.c')
0 files changed, 0 insertions, 0 deletions