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

Method NewObject

storage/filesystem/dotgit/dotgit.go:350–354  ·  view source on GitHub ↗

NewObject return a writer for a new object file.

()

Source from the content-addressed store, hash-verified

348
349// NewObject return a writer for a new object file.
350func (d *DotGit) NewObject() (*ObjectWriter, error) {
351 d.cleanObjectList()
352
353 return newObjectWriter(d.fs)
354}
355
356// ObjectsWithPrefix returns the hashes of objects that have the given prefix.
357func (d *DotGit) ObjectsWithPrefix(prefix []byte) ([]plumbing.Hash, error) {

Callers 5

SetEncodedObjectMethod · 0.80
LazyWriterMethod · 0.80
TestNewObjectMethod · 0.80
TestIssue55Function · 0.80

Calls 2

cleanObjectListMethod · 0.95
newObjectWriterFunction · 0.85

Tested by 3

TestNewObjectMethod · 0.64
TestIssue55Function · 0.64