MCPcopy
hub / github.com/go-git/go-git / NewStorage

Function NewStorage

storage/memory/storage.go:31–45  ·  view source on GitHub ↗

NewStorage returns a new Storage base on memory

()

Source from the content-addressed store, hash-verified

29
30// NewStorage returns a new Storage base on memory
31func NewStorage() *Storage {
32 return &Storage{
33 ReferenceStorage: make(ReferenceStorage),
34 ConfigStorage: ConfigStorage{},
35 ShallowStorage: ShallowStorage{},
36 ObjectStorage: ObjectStorage{
37 Objects: make(map[plumbing.Hash]plumbing.EncodedObject),
38 Commits: make(map[plumbing.Hash]plumbing.EncodedObject),
39 Trees: make(map[plumbing.Hash]plumbing.EncodedObject),
40 Blobs: make(map[plumbing.Hash]plumbing.EncodedObject),
41 Tags: make(map[plumbing.Hash]plumbing.EncodedObject),
42 },
43 ModuleStorage: make(ModuleStorage),
44 }
45}
46
47type ConfigStorage struct {
48 config *config.Config

Callers 15

TestInitMethod · 0.92
TestInitWithOptionsMethod · 0.92
TestInitBareMethod · 0.92
TestInitAlreadyExistsMethod · 0.92
TestOpenMethod · 0.92
TestOpenBareMethod · 0.92
TestOpenNotExistsMethod · 0.92
TestCloneMethod · 0.92
TestCloneContextMethod · 0.92
TestCloneMirrorMethod · 0.92

Calls

no outgoing calls

Tested by 15

TestInitMethod · 0.74
TestInitWithOptionsMethod · 0.74
TestInitBareMethod · 0.74
TestInitAlreadyExistsMethod · 0.74
TestOpenMethod · 0.74
TestOpenBareMethod · 0.74
TestOpenNotExistsMethod · 0.74
TestCloneMethod · 0.74
TestCloneContextMethod · 0.74
TestCloneMirrorMethod · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…