diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-03-05 15:06:26 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-03-05 15:06:26 -0800 |
commit | 6376463c37e0371a411013b90b2e8fc0f7d27dfa (patch) | |
tree | d2f08dd76391e6afad72a825bbd072ef53683281 /diffcore.h | |
parent | 2de34784dfcbb4fe0febe9ab98e0b99138040109 (diff) | |
parent | fce135c4ffc87f85e1c3b5c57a6d9e1abdbd074d (diff) | |
download | git-6376463c37e0371a411013b90b2e8fc0f7d27dfa.tar.gz |
Merge branch 'ks/combine-diff'
Teach combine-diff to honour the path-output-order imposed by
diffcore-order, and optimize how matching paths are found in
the N-way diffs made with parents.
* ks/combine-diff:
tests: add checking that combine-diff emits only correct paths
combine-diff: simplify intersect_paths() further
combine-diff: combine_diff_path.len is not needed anymore
combine-diff: optimize combine_diff_path sets intersection
diff test: add tests for combine-diff with orderfile
diffcore-order: export generic ordering interface
Diffstat (limited to 'diffcore.h')
-rw-r--r-- | diffcore.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/diffcore.h b/diffcore.h index 1315cfd4ef..92788ee4de 100644 --- a/diffcore.h +++ b/diffcore.h @@ -111,6 +111,20 @@ extern void diffcore_merge_broken(void); extern void diffcore_pickaxe(struct diff_options *); extern void diffcore_order(const char *orderfile); +/* low-level interface to diffcore_order */ +struct obj_order { + void *obj; /* setup by caller */ + + /* setup/used by order_objects() */ + int orig_order; + int order; +}; + +typedef const char *(*obj_path_fn_t)(void *obj); + +void order_objects(const char *orderfile, obj_path_fn_t obj_path, + struct obj_order *objs, int nr); + #define DIFF_DEBUG 0 #if DIFF_DEBUG void diff_debug_filespec(struct diff_filespec *, int, const char *); |