MCPcopy Index your code
hub / github.com/go-git/go-git / UpdateObjectStorage

Function UpdateObjectStorage

plumbing/format/packfile/common.go:26–38  ·  view source on GitHub ↗

UpdateObjectStorage updates the storer with the objects in the given packfile.

(s storer.Storer, packfile io.Reader)

Source from the content-addressed store, hash-verified

24// UpdateObjectStorage updates the storer with the objects in the given
25// packfile.
26func UpdateObjectStorage(s storer.Storer, packfile io.Reader) error {
27 if pw, ok := s.(storer.PackfileWriter); ok {
28 return WritePackfileToObjectStorage(pw, packfile)
29 }
30
31 p, err := NewParserWithStorage(NewScanner(packfile), s)
32 if err != nil {
33 return err
34 }
35
36 _, err = p.Parse()
37 return err
38}
39
40// WritePackfileToObjectStorage writes all the packfile objects into the given
41// object storage.

Callers 8

fetchPackMethod · 0.92
checkObjectNumberMethod · 0.92
writePackfileMethod · 0.92
storageFromPackfileMethod · 0.92
unpackRepositoryFunction · 0.92
TestDecodeMultiChainMethod · 0.92

Calls 4

NewParserWithStorageFunction · 0.85
NewScannerFunction · 0.70
ParseMethod · 0.45

Tested by 5

storageFromPackfileMethod · 0.74
unpackRepositoryFunction · 0.74
TestDecodeMultiChainMethod · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…