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

Function test_refs_compress

test/test_refs.py:296–304  ·  view source on GitHub ↗
(testrepo: Repository)

Source from the content-addressed store, hash-verified

294
295
296def test_refs_compress(testrepo: Repository) -> None:
297 packed_refs_file = Path(testrepo.path) / 'packed-refs'
298 assert not packed_refs_file.exists()
299 old_refs = [(ref.name, ref.target) for ref in testrepo.references.objects]
300
301 testrepo.references.compress()
302 assert packed_refs_file.exists()
303 new_refs = [(x.name, x.target) for x in testrepo.references.objects]
304 assert old_refs == new_refs
305
306
307#

Callers

nothing calls this directly

Calls 2

existsMethod · 0.80
compressMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…