MCPcopy Create free account
hub / github.com/go-git/go-git / Encode

Method Encode

plumbing/object/commit.go:278–280  ·  view source on GitHub ↗

Encode transforms a Commit into a plumbing.EncodedObject.

(o plumbing.EncodedObject)

Source from the content-addressed store, hash-verified

276
277// Encode transforms a Commit into a plumbing.EncodedObject.
278func (c *Commit) Encode(o plumbing.EncodedObject) error {
279 return c.encode(o, true)
280}
281
282// EncodeWithoutSignature export a Commit into a plumbing.EncodedObject without the signature (correspond to the payload of the PGP signature).
283func (c *Commit) EncodeWithoutSignature(o plumbing.EncodedObject) error {

Callers 2

writeCommitToRefFunction · 0.95
buildCommitObjectMethod · 0.95

Calls 1

encodeMethod · 0.95

Tested by 1

writeCommitToRefFunction · 0.76