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

Function test_diff_ids

test/test_diff.py:348–355  ·  view source on GitHub ↗
(barerepo: Repository)

Source from the content-addressed store, hash-verified

346
347
348def test_diff_ids(barerepo: Repository) -> None:
349 commit_a = barerepo[COMMIT_SHA1_1]
350 commit_b = barerepo[COMMIT_SHA1_2]
351 patch = commit_a.tree.diff_to_tree(commit_b.tree)[0]
352 assert patch is not None
353 delta = patch.delta
354 assert delta.old_file.id == '7f129fd57e31e935c6d60a0c794efe4e6927664b'
355 assert delta.new_file.id == 'af431f20fc541ed6d5afede3e2dc7160f6f01f16'
356
357
358def test_diff_patchid(barerepo: Repository) -> None:

Callers

nothing calls this directly

Calls 1

diff_to_treeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…