diff options
author | Tay Ray Chuan <rctay89@gmail.com> | 2011-07-12 14:10:25 +0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-07-12 09:29:20 -0700 |
commit | 8c912eea94a2138e8bc608f7c390eb0b313effb0 (patch) | |
tree | 244d67eaac3f77d6645bdf69b87e23a90dbb2485 /merge-recursive.c | |
parent | 46c8f2988dc9a6012babd5833a6245ceff214483 (diff) | |
download | git-8c912eea94a2138e8bc608f7c390eb0b313effb0.tar.gz |
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>
Diffstat (limited to 'merge-recursive.c')
-rw-r--r-- | merge-recursive.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/merge-recursive.c b/merge-recursive.c index db9ba19ddf..0cc1e6fc14 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -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")) |