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

Function NewObjectStorage

storage/filesystem/object.go:38–40  ·  view source on GitHub ↗

NewObjectStorage creates a new ObjectStorage with the given .git directory and cache.

(dir *dotgit.DotGit, objectCache cache.Object)

Source from the content-addressed store, hash-verified

36
37// NewObjectStorage creates a new ObjectStorage with the given .git directory and cache.
38func NewObjectStorage(dir *dotgit.DotGit, objectCache cache.Object) *ObjectStorage {
39 return NewObjectStorageWithOptions(dir, objectCache, Options{})
40}
41
42// NewObjectStorageWithOptions creates a new ObjectStorage with the given .git directory, cache and extra options
43func NewObjectStorageWithOptions(dir *dotgit.DotGit, objectCache cache.Object, ops Options) *ObjectStorage {

Calls 1