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

Function TestObjectOwner

object_test.go:92–107  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

90}
91
92func TestObjectOwner(t *testing.T) {
93 t.Parallel()
94 repo := createTestRepo(t)
95 defer cleanupTestRepo(t, repo)
96
97 commitId, treeId := seedTestRepo(t, repo)
98
99 commit, err := repo.LookupCommit(commitId)
100 checkFatal(t, err)
101
102 tree, err := repo.LookupTree(treeId)
103 checkFatal(t, err)
104
105 checkOwner(t, repo, commit.Object)
106 checkOwner(t, repo, tree.Object)
107}
108
109func checkShortId(t *testing.T, Id, shortId string) {
110 if len(shortId) < 7 || len(shortId) >= len(Id) {

Callers

nothing calls this directly

Calls 7

createTestRepoFunction · 0.85
cleanupTestRepoFunction · 0.85
seedTestRepoFunction · 0.85
checkFatalFunction · 0.85
checkOwnerFunction · 0.85
LookupCommitMethod · 0.80
LookupTreeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…