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

Function decodeCommit

tests/objectverify/main_test.go:108–117  ·  view source on GitHub ↗
(t *testing.T, raw []byte)

Source from the content-addressed store, hash-verified

106}
107
108func decodeCommit(t *testing.T, raw []byte) *object.Commit {
109 t.Helper()
110 obj := &plumbing.MemoryObject{}
111 obj.SetType(plumbing.CommitObject)
112 _, err := obj.Write(raw)
113 require.NoError(t, err)
114 c := &object.Commit{}
115 require.NoError(t, c.Decode(obj))
116 return c
117}
118
119func decodeTag(t *testing.T, raw []byte) *object.Tag {
120 t.Helper()

Callers 1

Calls 3

SetTypeMethod · 0.95
WriteMethod · 0.95
DecodeMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…