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

Method Encoded

lfs/pointer.go:69–82  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

67}
68
69func (p *Pointer) Encoded() string {
70 if p.Size == 0 {
71 return ""
72 }
73
74 var buffer bytes.Buffer
75 buffer.WriteString(fmt.Sprintf("version %s\n", latest))
76 for _, ext := range p.Extensions {
77 buffer.WriteString(fmt.Sprintf("ext-%d-%s %s:%s\n", ext.Priority, ext.Name, ext.OidType, ext.Oid))
78 }
79 buffer.WriteString(fmt.Sprintf("oid %s:%s\n", p.OidType, p.Oid))
80 buffer.WriteString(fmt.Sprintf("size %d\n", p.Size))
81 return buffer.String()
82}
83
84func EmptyPointer() *Pointer {
85 return NewPointer(fs.EmptyObjectSHA256, 0, nil)

Callers 4

fakeObjectsWithRandoDataFunction · 0.80
EncodePointerFunction · 0.80
DecodeFromFunction · 0.80
incomingOrCachedFunction · 0.80

Calls 1

StringMethod · 0.65

Tested by 1

fakeObjectsWithRandoDataFunction · 0.64