RFR: Cache the value of root() in GitRepository

Robin Westberg via github.com duke at openjdk.java.net
Fri Aug 16 13:03:27 UTC 2019


On Fri, 16 Aug 2019 13:02:23 GMT, Erik Duveblad via github.com <duke at openjdk.java.net> wrote:

> Hi all,
> 
> we do quite a bit of call to `GitRepository::root` in various methods, so instead of calling `git rev-parse --show-toplevel` every time for a value that never changes I figured we could cache it.
> 
> ## Testing
> - [x] `sh gradlew test`
> 
> ----------------
> 
> Commits:
>  - b8d9575f:	Cache the value of root() in GitRepository
> 
> Pull request:
> https://git.openjdk.java.net/skara/pull/50
> 
> Webrev:
> https://webrevs.openjdk.java.net/skara/50/webrev.00
> 
> Patch:
> https://git.openjdk.java.net/skara/pull/50.diff
> 
> Fetch command:
> git fetch https://git.openjdk.java.net/skara pull/50/head:pull/50

This PR has been reviewed by Robin Westberg via github.com - changes are approved. Review comment:

Looks good!

PR: https://git.openjdk.java.net/skara/pull/50


More information about the skara-dev mailing list