localrepo: Refactor and improvements to tree functions
This MR is a slew of improvements to tree functions in the localrepo
package. Namely, it adds an Entries
member to the TreeEntry
struct so it creates a new data structure that we can operate on in memory before we write the changes to the tree into Git.
This is broken out from !5567 (merged)
Edited by John Cai