MCPcopy Create free account
hub / github.com/docker/secrets-engine / revParse

Function revParse

x/release/command.go:338–344  ·  view source on GitHub ↗
(ctx context.Context, ref string)

Source from the content-addressed store, hash-verified

336}
337
338func revParse(ctx context.Context, ref string) (string, error) {
339 out, err := runGit(ctx, "rev-parse", ref)
340 if err != nil {
341 return "", fmt.Errorf("git rev-parse %s (%s): %s", ref, err, out)
342 }
343 return strings.TrimSpace(out), nil
344}
345
346func runGit(ctx context.Context, args ...string) (string, error) {
347 out, err := exec.CommandContext(ctx, "git", args...).CombinedOutput()

Callers 1

verifyReleaseRefFunction · 0.85

Calls 2

runGitFunction · 0.85
ErrorfMethod · 0.65

Tested by

no test coverage detected