Add FetchSHA abstraction to LocalRepository
Originally reported in !2693 (comment 435231130)
Fetching a single SHA is done in multiple places across Gitaly and is very verbose and error prone. Having a definitive and easy to use function will improve our code quality. Adding a new method FetchSHA to localrepo could enable this.
Edited by Sami Hiltunen