Presumably [`Tree.walk`](https://docs.rs/git2/latest/git2/struct.Tree.html#method.walk) would be faster than the current method, which traverses from the root to every directory.