]> git.proxmox.com Git - libgit2.git/commit
Some similarity metric adjustments
authorRussell Belfer <rb@github.com>
Sun, 13 Jan 2013 18:06:09 +0000 (10:06 -0800)
committerRussell Belfer <rb@github.com>
Wed, 20 Feb 2013 23:09:40 +0000 (15:09 -0800)
commitf3327cac1d5cc47d37eb79eb4235f40e447f3ef9
tree723a12da33717ac1780705513ba51b9c4927fa36
parent9c454b007b57669e7baf2b8b69cf053f32a620a2
Some similarity metric adjustments

This makes the text similarity metric treat \r as equivalent
to \n and makes it skip whitespace immediately following a line
terminator, so line indentation will have less effect on the
difference measurement (and so \r\n will be treated as just a
single line terminator).

This also separates the text and binary hash calculators into
two separate functions instead of have more if statements inside
the loop. This should make it easier to have more differentiated
heuristics in the future if we so wish.
src/buf_text.c