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

Function parseObjectIDHex

plumbing/object/commit_scanner.go:371–377  ·  view source on GitHub ↗
(data []byte, malformedErr error, header string)

Source from the content-addressed store, hash-verified

369}
370
371func parseObjectIDHex(data []byte, malformedErr error, header string) (plumbing.Hash, error) {
372 id := string(data)
373 if !plumbing.IsHash(id) {
374 return plumbing.ZeroHash, fmt.Errorf("%w: bad %s hash", malformedErr, header)
375 }
376 return plumbing.NewHash(id), nil
377}

Callers 3

scanTreeFunction · 0.85
scanParentsFunction · 0.85
scanTagObjectFunction · 0.85

Calls 2

IsHashFunction · 0.92
NewHashFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…