MCPcopy Create free account
hub / github.com/libgit2/pygit2 / test_peel_commit

Function test_peel_commit

test/test_object.py:83–91  ·  view source on GitHub ↗
(testrepo: Repository)

Source from the content-addressed store, hash-verified

81
82
83def test_peel_commit(testrepo: Repository) -> None:
84 # start by looking up the commit
85 commit_id = testrepo.lookup_reference('refs/heads/master').target
86 commit = testrepo[commit_id]
87 # and peel to the tree
88 tree = commit.peel(ObjectType.TREE)
89
90 assert type(tree) is Tree
91 assert tree.id == 'fd937514cb799514d4b81bb24c5fcfeb6472b245'
92
93
94def test_peel_commit_type(testrepo: Repository) -> None:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…