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

Method NewObjectPack

storage/filesystem/dotgit/dotgit.go:215–218  ·  view source on GitHub ↗

NewObjectPack return a writer for a new packfile, it saves the packfile to disk and also generates and save the index for the given packfile.

()

Source from the content-addressed store, hash-verified

213// NewObjectPack return a writer for a new packfile, it saves the packfile to
214// disk and also generates and save the index for the given packfile.
215func (d *DotGit) NewObjectPack() (*PackWriter, error) {
216 d.cleanPackList()
217 return newPackWrite(d.fs)
218}
219
220// ObjectPacks returns the list of availables packfiles
221func (d *DotGit) ObjectPacks() ([]plumbing.Hash, error) {

Callers 3

PackfileWriterMethod · 0.80
TestNewObjectPackMethod · 0.80

Calls 2

cleanPackListMethod · 0.95
newPackWriteFunction · 0.85

Tested by 2

TestNewObjectPackMethod · 0.64