From 91e4f03604bd089e09154e95294d5d08c805ea49 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Wed, 5 Mar 2008 20:06:18 -0800 Subject: Make 'traverse_trees()' traverse conflicting DF entries in parallel This makes the traverse_trees() entry comparator routine use the more relaxed form of name comparison that considers files and directories with the same name identical. We pass in a separate mask for just the directory entries, so that the callback routine can decide (if it wants to) to only handle one or the other type, but generally most (all?) users are expected to really want to see the case of a name 'foo' showing up in one tree as a file and in another as a directory at the same time. In particular, moving 'unpack_trees()' over to use this tree traversal mechanism requires this. Signed-off-by: Linus Torvalds Signed-off-by: Junio C Hamano --- merge-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'merge-tree.c') diff --git a/merge-tree.c b/merge-tree.c index 8be0b9f910..02fc10f7e6 100644 --- a/merge-tree.c +++ b/merge-tree.c @@ -287,7 +287,7 @@ static void unresolved(const struct traverse_info *info, struct name_entry n[3]) * The successful merge rules are the same as for the three-way merge * in git-read-tree. */ -static int threeway_callback(int n, unsigned long mask, struct name_entry *entry, struct traverse_info *info) +static int threeway_callback(int n, unsigned long mask, unsigned long dirmask, struct name_entry *entry, struct traverse_info *info) { /* Same in both? */ if (same_entry(entry+1, entry+2)) { -- cgit v1.2.1