commit: Use localrepo APIs to resolve languages revision
To calculate the commit languages, the given revision is first resolved to a commit ID. To determine this commit ID, some direct calls to git-rev-parse(1) and git-for-each-ref(1) were done.
Use standard APIs in localrepo to make these calls to Git. This deduplicates code and makes the error handling more robust.
To make this possible a change in localrepo.ResolveRevision()
is made
to detect ambiguous revisions.
Edited by Toon Claes