def id_for_ref(ref)
      return ref if ref.match(/[0-9a-f]{40}/)
      @refs[ref] = ::Octokit.commit(@path, ref).sha unless @refs.key? ref
      @refs[ref]
    end
def id_for_ref(ref)
      return ref if ref.match(/[0-9a-f]{40}/)
      @refs[ref] = ::Octokit.commit(@path, ref).sha unless @refs.key? ref
      @refs[ref]
    end
Returns the unique identifier for the commit the given reference – like a
 branch name – is pointing to

 Returns the given ref name immediately if it is a full SHA1 commit ID.

 @param [String] ref A symbolic reference name
 @return [String] The SHA1 ID of the commit the reference is pointing to