MCPcopy Create free account
hub / github.com/google/gapid / Get

Method Get

core/git/get.go:20–26  ·  view source on GitHub ↗

Get returns a versioned file using `git show` at the specified CL.

(ctx context.Context, path string, at SHA)

Source from the content-addressed store, hash-verified

18
19// Get returns a versioned file using `git show` at the specified CL.
20func (g Git) Get(ctx context.Context, path string, at SHA) ([]byte, error) {
21 str, _, err := g.run(ctx, "show", at.String()+":"+path)
22 if err != nil {
23 return nil, err
24 }
25 return []byte(str), nil
26}

Callers

nothing calls this directly

Calls 2

runMethod · 0.95
StringMethod · 0.65

Tested by

no test coverage detected