Previously a Yield object was either a file dump, or a simple
enumeration on a directories children, with no associated type state
for them. This commit implements a mechanism to internally fetch this
type information, to pass out to a user via the Yield type.
This way it is much easier to figure out which entries are
directories, and which are files. Additional queries have to be
passed into the FileTree for lookups. In a way, this commit gives up
on the idea of having a nested API structure for the time being, until
constructing sub-FileTrees becomes a real necessity
This implementation is a bit weird, especially because it changes the
API from what it was previously. This works, for now, but some of the
relationships between types feel a bit bad. Especially that all
queries have to go via the FileTree, and we can't just give out
objects that represent some part of the tree that are then loaded when
needed.
For now this will work though. What's still missing is to turn a
Yield::Dir into a new FileTree.
This code is work-in-progress, and doesn't work on a repo that has a
branched history. The issue here is that after handling a merge
commit, keeping track of which commit to look at next is non-trivial.
This solution tries to isuse a "skip" command on the walker, but this
can accidentally skip commits, when two merges have happened in
succession (maybe a bug with the impl, not the concept).
But also, the actual merge commit seems to already be part of the
norma history? So maybe we can ommit the merge commit explicitly, and
simply return a new branch handle instead.