I wonder if there was a specific reason to not use 'revparse-single', and instead mostly reinvent it with (resolve-reference ...). This approach can be simplified further by deprecating the 'commit' and 'branch' fields, and just use a single reference string.