mirror of
https://seed.radicle.dev/rad:z6cFWeWpnZNHh9rUW8phgA3b5yGt.git
synced 2026-11-01 09:20:29 +08:00
The computation for getting the last commit that touched a `Tree` can be expensive. This is avoided when constructing the `Tree` and is moved to a method on the `Tree` and `Entry`, aptly named `last_commit`. `Tree::commit` is kept, however, it now refers to the `Commit` that was used when constructing the `Tree`. This is required to calculate the last commit. It was also necessary to add the path of the `Tree`. For adding `Entry::last_commit`, it was necessary to add the path of the `Entry`. Incidentally, this can be useful for consumers, since just the `name` would mean that they would have to manually construct the full path.