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

Function test_workdir_to_tree

test/test_diff.py:190–200  ·  view source on GitHub ↗
(dirtyrepo: Repository)

Source from the content-addressed store, hash-verified

188
189
190def test_workdir_to_tree(dirtyrepo: Repository) -> None:
191 repo = dirtyrepo
192 head = repo[repo.lookup_reference('HEAD').resolve().target]
193
194 diff = head.tree.diff_to_workdir()
195 files = [patch.delta.new_file.path for patch in diff_safeiter(diff)]
196 assert DIFF_HEAD_TO_WORKDIR_EXPECTED == files
197
198 diff = repo.diff('HEAD')
199 files = [patch.delta.new_file.path for patch in diff_safeiter(diff)]
200 assert DIFF_HEAD_TO_WORKDIR_EXPECTED == files
201
202
203def test_index_to_workdir(dirtyrepo: Repository) -> None:

Callers

nothing calls this directly

Calls 3

diff_safeiterFunction · 0.85
diff_to_workdirMethod · 0.80
diffMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…