MCPcopy Index your code
hub / github.com/dagger/dagger / resolveModuleSourceCommit

Function resolveModuleSourceCommit

core/lockfile_update.go:191–206  ·  view source on GitHub ↗
(ctx context.Context, query *Query, source string)

Source from the content-addressed store, hash-verified

189}
190
191func resolveModuleSourceCommit(ctx context.Context, query *Query, source string) (string, error) {
192 bk, err := query.Engine(ctx)
193 if err != nil {
194 return "", fmt.Errorf("failed to get engine client: %w", err)
195 }
196
197 parsedRef, err := ParseRefString(ctx, NewCallerStatFS(bk), source, "")
198 if err != nil {
199 return "", fmt.Errorf("parse module source %q: %w", source, err)
200 }
201 if parsedRef.Kind != ModuleSourceKindGit {
202 return "", fmt.Errorf("module source %q is not a git source", source)
203 }
204
205 return resolveParsedGitRefCommit(ctx, parsedRef.Git, "")
206}
207
208func parseGitLookupInputs(operation string, inputs []any) (string, string, error) {
209 if len(inputs) != 2 {

Callers 1

Calls 4

ParseRefStringFunction · 0.85
NewCallerStatFSFunction · 0.85
EngineMethod · 0.65

Tested by

no test coverage detected