aboutsummaryrefslogtreecommitdiff
path: root/commitquery/query_resolve_commitish.go
blob: 117b69f20a5738a2f923d72811b5a8b5d9164f6f (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
package commitquery

import objectid "lindenii.org/go/furgit/object/id"

// resolveCommitish peels one commit-ish object ID and resolves the commit.
func (query *query) resolveCommitish(id objectid.ObjectID) (nodeIndex, error) {
	id, err := query.fetcher.PeelToCommitID(id)
	if err != nil {
		return 0, err
	}

	return query.resolveOID(id)
}