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

Method TestPatchContext_ToNil

plumbing/object/commit_test.go:191–198  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

189}
190
191func (s *SuiteCommit) TestPatchContext_ToNil(c *C) {
192 from := s.commit(c, plumbing.NewHash("918c48b83bd081e863dbe1b80f8998f058cd8294"))
193
194 patch, err := from.PatchContext(context.Background(), nil)
195 c.Assert(err, IsNil)
196
197 c.Assert(len(patch.String()), Equals, 242679)
198}
199
200func (s *SuiteCommit) TestCommitEncodeDecodeIdempotent(c *C) {
201 pgpsignature := `-----BEGIN PGP SIGNATURE-----

Callers

nothing calls this directly

Calls 4

NewHashFunction · 0.92
commitMethod · 0.80
StringMethod · 0.65
PatchContextMethod · 0.45

Tested by

no test coverage detected