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

Function test_merge_base

test/test_repository.py:278–291  ·  view source on GitHub ↗
(testrepo: Repository)

Source from the content-addressed store, hash-verified

276
277
278def test_merge_base(testrepo: Repository) -> None:
279 commit = testrepo.merge_base(
280 '5ebeeebb320790caf276b9fc8b24546d63316533',
281 '4ec4389a8068641da2d6578db0419484972284c8',
282 )
283 assert commit == 'acecd5ea2924a4b900e7e149496e1f4b57976e51'
284
285 # Create a commit without any merge base to any other
286 sig = pygit2.Signature('me', 'me@example.com')
287 indep = testrepo.create_commit(
288 None, sig, sig, 'a new root commit', testrepo[commit].peel(pygit2.Tree).id, []
289 )
290
291 assert testrepo.merge_base(indep, commit) is None
292
293
294def test_descendent_of(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…