MCPcopy Create free account
hub / github.com/go-git/go-git / testObjects

Function testObjects

storage/filesystem/dotgit/dotgit_test.go:608–615  ·  view source on GitHub ↗
(c *C, fs billy.Filesystem, dir *DotGit)

Source from the content-addressed store, hash-verified

606}
607
608func testObjects(c *C, fs billy.Filesystem, dir *DotGit) {
609 hashes, err := dir.Objects()
610 c.Assert(err, IsNil)
611 c.Assert(hashes, HasLen, 187)
612 c.Assert(hashes[0].String(), Equals, "0097821d427a3c3385898eb13b50dcbc8702b8a3")
613 c.Assert(hashes[1].String(), Equals, "01d5fa556c33743006de7e76e67a2dfcd994ca04")
614 c.Assert(hashes[2].String(), Equals, "03db8e1fbe133a480f2867aac478fd866686d69e")
615}
616
617func testObjectsWithPrefix(c *C, fs billy.Filesystem, dir *DotGit) {
618 prefix, _ := hex.DecodeString("01d5")

Callers 2

TestObjectsMethod · 0.85
TestObjectsExclusiveMethod · 0.85

Calls 2

StringMethod · 0.65
ObjectsMethod · 0.45

Tested by

no test coverage detected