MCPcopy Create free account
hub / github.com/libgit2/git2go / TestRevparseExt

Function TestRevparseExt

revparse_test.go:33–50  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

31}
32
33func TestRevparseExt(t *testing.T) {
34 t.Parallel()
35 repo := createTestRepo(t)
36 defer cleanupTestRepo(t, repo)
37
38 _, treeId := seedTestRepo(t, repo)
39
40 ref, err := repo.References.Create("refs/heads/master", treeId, true, "")
41 checkFatal(t, err)
42
43 obj, ref, err := repo.RevparseExt("master")
44 checkFatal(t, err)
45
46 checkObject(t, obj, treeId)
47 if ref == nil {
48 t.Fatalf("bad reference")
49 }
50}
51
52func checkObject(t *testing.T, obj *Object, id *Oid) {
53 if obj == nil {

Callers

nothing calls this directly

Calls 7

createTestRepoFunction · 0.85
cleanupTestRepoFunction · 0.85
seedTestRepoFunction · 0.85
checkFatalFunction · 0.85
checkObjectFunction · 0.85
RevparseExtMethod · 0.80
CreateMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…