RFR: Cache the value of root() in GitRepository

Erik Duveblad via github.com duke at openjdk.java.net
Fri Aug 16 13:02:23 UTC 2019


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


More information about the skara-dev mailing list