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

Function testCommitAndTree

plumbing/object/commitgraph/commitnode_test.go:89–98  ·  view source on GitHub ↗
(c *C, nodeIndex CommitNodeIndex)

Source from the content-addressed store, hash-verified

87}
88
89func testCommitAndTree(c *C, nodeIndex CommitNodeIndex) {
90 merge3node, err := nodeIndex.Get(plumbing.NewHash("6f6c5d2be7852c782be1dd13e36496dd7ad39560"))
91 c.Assert(err, IsNil)
92 merge3commit, err := merge3node.Commit()
93 c.Assert(err, IsNil)
94 c.Assert(merge3node.ID().String(), Equals, merge3commit.ID().String())
95 tree, err := merge3node.Tree()
96 c.Assert(err, IsNil)
97 c.Assert(tree.ID().String(), Equals, merge3commit.TreeHash.String())
98}
99
100func (s *CommitNodeSuite) TestObjectGraph(c *C) {
101 f := fixtures.ByTag("commit-graph").One()

Callers 3

TestObjectGraphMethod · 0.85
TestCommitGraphMethod · 0.85
TestMixedGraphMethod · 0.85

Calls 6

NewHashFunction · 0.92
GetMethod · 0.65
CommitMethod · 0.65
StringMethod · 0.65
IDMethod · 0.65
TreeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…