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

Function encodeRawTreeEntries

plumbing/object/tree_test.go:1681–1691  ·  view source on GitHub ↗
(entries ...rawTreeEntry)

Source from the content-addressed store, hash-verified

1679}
1680
1681func encodeRawTreeEntries(entries ...rawTreeEntry) []byte {
1682 var buf bytes.Buffer
1683 for _, e := range entries {
1684 buf.WriteString(e.mode)
1685 buf.WriteByte(' ')
1686 buf.WriteString(e.name)
1687 buf.WriteByte(0)
1688 buf.Write(e.hash)
1689 }
1690 return buf.Bytes()
1691}
1692
1693func newRawTreeObject(t *testing.T, body []byte) *plumbing.MemoryObject {
1694 t.Helper()

Calls 2

WriteMethod · 0.45
BytesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…