EncodeWithoutSignature exports a Commit into a plumbing.EncodedObject without any signature headers, producing the payload that PGP/GPG signatures are computed over. Behaviour depends on how the Commit was created: - For Commits populated by Decode whose exported fields still match the source obje
(o plumbing.EncodedObject)
| 305 | // object and comparing exported fields; if any differ, the in-memory |
| 306 | // representation prevails. |
| 307 | func (c *Commit) EncodeWithoutSignature(o plumbing.EncodedObject) error { |
| 308 | if c.matchesSource() { |
| 309 | return stripObjectSignatures(o, c.src, plumbing.CommitObject) |
| 310 | } |
| 311 | return c.encode(o, false) |
| 312 | } |
| 313 | |
| 314 | // matchesSource reports whether c.src is set and re-decoding it produces a |
| 315 | // Commit whose payload-affecting exported fields are identical to those of |
no test coverage detected