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 <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
5803c6f8a2
commit
91e4f03604
@ -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)) {
|
||||
|
Reference in New Issue
Block a user