MCPcopy Index your code
hub / github.com/git-lfs/git-lfs / ObjectPath

Method ObjectPath

fs/fs.go:75–87  ·  view source on GitHub ↗
(oid string)

Source from the content-addressed store, hash-verified

73}
74
75func (f *Filesystem) ObjectPath(oid string) (string, error) {
76 if len(oid) < 4 {
77 return "", errors.New(tr.Tr.Get("too short object ID: %q", oid))
78 }
79 if oid == EmptyObjectSHA256 {
80 return os.DevNull, nil
81 }
82 dir := f.localObjectDir(oid)
83 if err := tools.MkdirAll(dir, f); err != nil {
84 return "", errors.New(tr.Tr.Get("error trying to create local storage directory in %q: %s", dir, err))
85 }
86 return filepath.Join(dir, oid), nil
87}
88
89func (f *Filesystem) ObjectPathname(oid string) string {
90 if oid == EmptyObjectSHA256 {

Callers 8

delayedSmudgeFunction · 0.45
downloadTransferFunction · 0.45
pruneDeleteFilesFunction · 0.45
uploadTransferMethod · 0.45
uploadsWithObjectIDsFunction · 0.45
cleanFunction · 0.45
uploadTransferFunction · 0.45
writeLFSPointerMethod · 0.45

Calls 3

localObjectDirMethod · 0.95
MkdirAllFunction · 0.92
GetMethod · 0.65

Tested by

no test coverage detected