MCPcopy Create free account
hub / github.com/libgit2/git2go / checkShortId

Function checkShortId

object_test.go:109–117  ·  view source on GitHub ↗
(t *testing.T, Id, shortId string)

Source from the content-addressed store, hash-verified

107}
108
109func checkShortId(t *testing.T, Id, shortId string) {
110 if len(shortId) < 7 || len(shortId) >= len(Id) {
111 t.Fatalf("bad shortId length %d", len(shortId))
112 }
113
114 if !strings.HasPrefix(Id, shortId) {
115 t.Fatalf("bad shortId, should be prefix of %s, but is %s\n", Id, shortId)
116 }
117}
118
119func TestObjectShortId(t *testing.T) {
120 t.Parallel()

Callers 1

TestObjectShortIdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…