MCPcopy Index your code
hub / github.com/go-git/go-git / gitVerifyCommit

Function gitVerifyCommit

tests/objectverify/main_test.go:332–341  ·  view source on GitHub ↗
(t *testing.T, repo string, h plumbing.Hash)

Source from the content-addressed store, hash-verified

330}
331
332func gitVerifyCommit(t *testing.T, repo string, h plumbing.Hash) error {
333 t.Helper()
334 cmd := exec.Command("git", "-C", repo, "verify-commit", h.String())
335 var stderr bytes.Buffer
336 cmd.Stderr = &stderr
337 if err := cmd.Run(); err != nil {
338 return fmt.Errorf("%w: %s", err, stderr.String())
339 }
340 return nil
341}
342
343func gitVerifyTag(t *testing.T, repo string, h plumbing.Hash) error {
344 t.Helper()

Callers 1

Calls 2

CommandMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…