// GetCommitHashForRev returns the hash value of the commit for a given rev.
GetCommitHashForRev returns the hash value of the commit for a given rev.
// GetCommitHashForRev returns the hash value of the commit for a given rev .
func (r *repo) GetCommitHashForRev(ctx context.Context, rev string) (string, error) {
	out, err := r.runGitCommand(ctx, "rev-parse", rev)
	if err != nil {
		return "", formatCommandError(err, out)
	}
	return strings.TrimSpace(string(out)), nil
}
func ( r * repo ) GetCommitHashForRev ( ctx context . Context , rev string ) ( string , error ) { out , err := r . runGitCommand ( ctx , " " , rev ) if err != nil { return " " , formatCommandError ( err , out ) } return strings . TrimSpace ( string ( out ) ) , nil }
GetCommitHashForRev returns the hash value of the commit for a given rev.
GetCommitHashForRev returns the hash value of the commit for a given rev .