MCPcopy Create free account
hub / github.com/rsc/tmp / add

Method add

gitfs/fs.go:166–188  ·  view source on GitHub ↗

add adds an object with the given type and content to s, returning its Hash. If the object is already stored in s, add succeeds but doesn't store a second copy.

(typ objType, data []byte)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

unpackObjectFunction · 0.45

Calls 2

ResetMethod · 0.80
WriteMethod · 0.45

Tested by

no test coverage detected