func (r *RepositoryRevisions) OnlyHEAD() bool {
	if !r.OnlyExplicit() || len(r.Revs) != 1 {
		return false
	}
	rev := r.Revs[0].RevSpec
	return rev == "" || rev == "HEAD"
}
// OnlyHEAD returns true iff there is only one ref and it is explicitly the
// default branch.
//
// Note: This doesn't resolve what the default branch is. It relies on the rev
// being "" (Sourcegraph convention for default) or "HEAD" (git symref for
// default).
OnlyHEAD returns true iff there is only one ref and it is explicitly the
default branch.

This doesn't resolve what the default branch is. It relies on the rev
being "" (Sourcegraph convention for default) or "HEAD" (git symref for
default).
// OnlyHEAD returns true iff there is only one ref and it is explicitly the // default branch . // // Note : This doesn ' t resolve what the default branch is . It relies on the rev // being " " ( Sourcegraph convention for default ) or " HEAD " ( git symref for // default ) .
func (r *RepositoryRevisions) OnlyHEAD() bool {
	if !r.OnlyExplicit() || len(r.Revs) != 1 {
		return false
	}
	rev := r.Revs[0].RevSpec
	return rev == "" || rev == "HEAD"
}
func ( r * RepositoryRevisions ) OnlyHEAD ( ) bool { if ! r . OnlyExplicit ( ) || len ( r . Revs ) != 1 { return false } rev := r . Revs [ 0 ] . RevSpec return rev == " " || rev == " " }
OnlyHEAD returns true iff there is only one ref and it is explicitly the
default branch.
OnlyHEAD returns true iff there is only one ref and it is explicitly the default branch .