def exact

ezx@1.11.0.0 · src/git/git.bend:150

import ezx@1.11.0.0/src/git/git.bend as Git
import Base

150# the commit a ref names, from the rows the remote answered with. A tag comes
151# first, through its peeled `^{}` row when it is annotated, since that row is
152# the commit and the other is the tag object; then a branch of that name. No
153# other row is ever picked, so a tag and a branch that share a name resolve to
154# the tag, and `main` never resolves to `feature/main`.
155def exact(+rs: List<&2, Row>, +ref: String) -> String:
156  or_else(named(rs, "refs/tags/" ++ ref ++ "^{}"),
157    or_else(named(rs, "refs/tags/" ++ ref), named(rs, "refs/heads/" ++ ref)))

Uses (6)

Used by (3)