aboutsummaryrefslogtreecommitdiff
path: root/diffcore-delta.c
Commit message (Collapse)AuthorAge
* Introduce diff_filespec_is_binary()Junio C Hamano2007-07-06
| | | | | | | | | | | This replaces an explicit initialization of filespec->is_binary field used for rename/break followed by direct access to that field with a wrapper function that lazily iniaitlizes and accesses the field. We would add more attribute accesses for the use of diff routines, and it would be better to make this abstraction earlier. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* diffcore-delta.c: Ignore CR in CRLF for text filesJunio C Hamano2007-06-30
| | | | | | | | | | | | This ignores CR byte in CRLF sequence in text file when computing similarity of two blobs. Usually this should not matter as nobody sane would be checking in a file with CRLF line endings to the repository (they would use autocrlf so that the repository copy would have LF line endings). Signed-off-by: Junio C Hamano <gitster@pobox.com>
* diffcore-delta.c: update the comment on the algorithm.Junio C Hamano2007-06-30
| | | | | | | | | | The comment at the top of the file described an old algorithm that was neutral to text/binary differences (it hashed sliding window of N-byte sequences and counted overlaps), but long time ago we switched to a new heuristics that are more suitable for line oriented (read: text) files that are much faster. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* diffcore_count_changes: pass diffcore_filespecJunio C Hamano2007-06-30
| | | | | | | | | | We may want to use richer information on the data we are dealing with in this function, so instead of passing a buffer address and length, just pass the diffcore_filespec structure. Existing callers always call this function with parameters taken from a filespec anyway, so there is no functionality changes. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* diffcore-delta: 64-byte-or-EOL ultrafast replacement (hash fix).Linus Torvalds2006-03-15
| | | | | | | The rotating 64-bit number was not really rotating, and worse yet ulong was longer than 64-bit on 64-bit architectures X-<. Signed-off-by: Junio C Hamano <junkio@cox.net>
* diffcore-delta: 64-byte-or-EOL ultrafast replacement.Linus Torvalds2006-03-15
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* diffcore-delta: tweak hashbase value.Junio C Hamano2006-03-12
| | | | | | | | | This tweaks the maximum hashvalue we use to hash the string into without making the maximum size of the hashtable can grow from the current limit. With this, the renames detected becomes a bit more precise without incurring additional paging cost. Signed-off-by: Junio C Hamano <junkio@cox.net>
* diffcore-delta: make the hash a bit denser.Junio C Hamano2006-03-12
| | | | | | | | To reduce wasted memory, wait until the hash fills up more densely before we rehash. This reduces the working set size a bit further. Signed-off-by: Junio C Hamano <junkio@cox.net>
* diffcore-rename: somewhat optimized.Junio C Hamano2006-03-12
| | | | | | | | | This changes diffcore-rename to reuse statistics information gathered during similarity estimation, and updates the hashtable implementation used to keep track of the statistics to be denser. This seems to give better performance. Signed-off-by: Junio C Hamano <junkio@cox.net>
* diffcore-delta: make change counter to byte oriented again.Junio C Hamano2006-03-04
| | | | | | | | The textual line oriented change counter was fun but was not very effective. It tended to overcount the changes. This one changes it to a simple N-letter substring based implementation. Signed-off-by: Junio C Hamano <junkio@cox.net>
* diffcore-rename: split out the delta counting code.Junio C Hamano2006-02-28
This is to rework diffcore break/rename/copy detection code so that it does not affected when deltifier code gets improved. Signed-off-by: Junio C Hamano <junkio@cox.net>