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>
This commit is contained in:

committed by
Junio C Hamano

parent
46c8f2988d
commit
8c912eea94
@ -1759,6 +1759,8 @@ int parse_merge_opt(struct merge_options *o, const char *s)
|
||||
o->subtree_shift = s + strlen("subtree=");
|
||||
else if (!strcmp(s, "patience"))
|
||||
o->xdl_opts |= XDF_PATIENCE_DIFF;
|
||||
else if (!strcmp(s, "histogram"))
|
||||
o->xdl_opts |= XDF_HISTOGRAM_DIFF;
|
||||
else if (!strcmp(s, "ignore-space-change"))
|
||||
o->xdl_opts |= XDF_IGNORE_WHITESPACE_CHANGE;
|
||||
else if (!strcmp(s, "ignore-all-space"))
|
||||
|
Reference in New Issue
Block a user