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

Method Shallow

storage/filesystem/dotgit/dotgit.go:200–211  ·  view source on GitHub ↗

Shallow returns a file pointer for read to the shallow file

()

Source from the content-addressed store, hash-verified

198
199// Shallow returns a file pointer for read to the shallow file
200func (d *DotGit) Shallow() (billy.File, error) {
201 f, err := d.fs.Open(shallowPath)
202 if err != nil {
203 if os.IsNotExist(err) {
204 return nil, nil
205 }
206
207 return nil, err
208 }
209
210 return f, nil
211}
212
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.

Callers

nothing calls this directly

Calls 1

OpenMethod · 0.45

Tested by

no test coverage detected