This method walks over two real git trees (head und merge). The two other things I am walking over are not really trees: the index (DirCache) is not a tree and the FileSystem with our working tree is also no tree. When we enter this method then the end-user has specified exactly two trees - and index and working tree are derived from the current repo. That's I guess why this method was once named preScanTwoTrees().