]> git.proxmox.com Git - libgit2.git/commit
Change similarity metric to sampled hashes
authorRussell Belfer <rb@github.com>
Fri, 15 Feb 2013 01:25:10 +0000 (17:25 -0800)
committerRussell Belfer <rb@github.com>
Wed, 20 Feb 2013 23:09:40 +0000 (15:09 -0800)
commit5e5848eb15cc0dd8476d1c6882a9f770e6556586
tree953fd30d6360b67c2174b6c03fd2984561c84cf6
parent99ba8f2322eaa2df51ace9782b8eadc8c5a6e8b8
Change similarity metric to sampled hashes

This moves the similarity metric code out of buf_text and into a
new file.  Also, this implements a different approach to similarity
measurement based on a Rabin-Karp rolling hash where we only keep
the top 100 and bottom 100 hashes.  In theory, that should be
sufficient samples to given a fairly accurate measurement while
limiting the amount of data we keep for file signatures no matter
how large the file is.
src/buf_text.c
src/buf_text.h
src/diff_tform.c
src/hashsig.c [new file with mode: 0644]
src/hashsig.h [new file with mode: 0644]
tests-clar/core/buffer.c