ResolveRevision returns the commit id for revision. revision can be either a commit ID in string form or a branch name.
(ctx context.Context, revision string)
| 148 | // ResolveRevision returns the commit id for revision. revision can be either a |
| 149 | // commit ID in string form or a branch name. |
| 150 | func (p *Pool) ResolveRevision(ctx context.Context, revision string) (ksuid.KSUID, error) { |
| 151 | id, err := dbid.ParseID(revision) |
| 152 | if err != nil { |
| 153 | branch, err := p.LookupBranchByName(ctx, revision) |
| 154 | if err != nil { |
| 155 | return ksuid.Nil, err |
| 156 | } |
| 157 | id = branch.Commit |
| 158 | } |
| 159 | return id, nil |
| 160 | } |
| 161 | |
| 162 | func (p *Pool) BatchifyBranches(ctx context.Context, sctx *super.Context, recs []super.Value, m *sup.MarshalBSUPContext, f expr.Evaluator) ([]super.Value, error) { |
| 163 | branches, err := p.ListBranches(ctx) |
no test coverage detected