示例#1
0
// Parse the commit hash of a single commit from a reference, converting to HEAD
// where needed
//
// return result.Result<*string, error>
func ResolveSingleCommitHash(repo *git.Repository, commitish string) result.Result {
	return result.NewResult(repo.RevparseSingle(ExpandCommitish(commitish))).FlatMap(getObjectId)
}