(testrepo: Repository)
| 294 | |
| 295 | |
| 296 | def 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 | # |