From: Junio C Hamano Date: Sun, 20 Sep 2009 05:06:09 GMT Subject: [WIP PATCH 0/6] Merging with D/F conflicts Message-ID: <1253423175-6339-1-git-send-email-gitster@pobox.com> I have been working on this on-and-off and it still is not finished, but I thought it would be a good place to stop, especially since this will not be part of the upcoming 1.6.5 anyway. The first three patches are preparatory clean-ups. The fourth patch roughly corresponds to Linus's 880386c (Prepare 'traverse_trees()' for D/F conflict lookahead, 2009-09-06), but it does implement multi-entry lookahead. It reveals why lookahead on the tree side alone is not sufficient by breaking a few tests. The fifth one starts to compensate for the change in the tree side by preparing the side that walks the index for a similar lookahead mechanism, but it does not actually implement the lookahead yet. The last one is a debugging patch. This change has to break the output order (but not content) of the diff-index somewhat. If you had this: Index Tree b b-2/c b-2 b/d the expected output order from diff-index is b, b-2, b-2/c, then b/d. But if you walk the tree and the index in parallel, we would end up showing b, b/d, b-2 and then b-2/c. A sad part of the story is that diff-index always emits D/F conflicted entries as two independent records, so it is rather a bad match to the unpack_trees() framework to begin with. The patches are designed to apply on 79b4fde (Merge branch 'maint', 2009-09-03). Junio C Hamano (6): diff-lib.c: fix misleading comments on oneway_diff() unpack-trees: typofix unpack_callback(): use unpack_failed() consistently traverse_trees(): handle D/F conflict case sanely unpack-trees.c: prepare for looking ahead in the index read-tree --debug-unpack builtin-read-tree.c | 36 +++++++ cache.h | 2 + diff-lib.c | 20 +---- tree-walk.c | 277 +++++++++++++++++++++++++++++++++++++++++++-------- unpack-trees.c | 275 ++++++++++++++++++++++++++++++++++++++------------ unpack-trees.h | 3 +- 6 files changed, 484 insertions(+), 129 deletions(-)