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

Function NewObjectStorageWithOptions

storage/filesystem/object.go:43–49  ·  view source on GitHub ↗

NewObjectStorageWithOptions creates a new ObjectStorage with the given .git directory, cache and extra options

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

Source from the content-addressed store, hash-verified

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 {
44 return &ObjectStorage{
45 options: ops,
46 objectCache: objectCache,
47 dir: dir,
48 }
49}
50
51func (s *ObjectStorage) requireIndex() error {
52 if s.index != nil {

Calls

no outgoing calls