summaryrefslogtreecommitdiff
path: root/diffcore.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-03-05 23:06:26 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-03-05 23:06:26 (GMT)
commit6376463c37e0371a411013b90b2e8fc0f7d27dfa (patch)
treed2f08dd76391e6afad72a825bbd072ef53683281 /diffcore.h
parent2de34784dfcbb4fe0febe9ab98e0b99138040109 (diff)
parentfce135c4ffc87f85e1c3b5c57a6d9e1abdbd074d (diff)
downloadgit-6376463c37e0371a411013b90b2e8fc0f7d27dfa.zip
git-6376463c37e0371a411013b90b2e8fc0f7d27dfa.tar.gz
git-6376463c37e0371a411013b90b2e8fc0f7d27dfa.tar.bz2
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.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/diffcore.h b/diffcore.h
index 1315cfd..92788ee 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 *);