(obj: Object | Commit, msg: str)
| 120 | seen: dict[str, Oid] = {} # from short_id to full hex id |
| 121 | |
| 122 | def test_obj(obj: Object | Commit, msg: str) -> None: |
| 123 | short_id = obj.short_id |
| 124 | msg = msg + f' short_id={short_id}' |
| 125 | already = seen.get(short_id) |
| 126 | if already: |
| 127 | assert already == obj.id |
| 128 | else: |
| 129 | seen[short_id] = obj.id |
| 130 | lookup = testrepo[short_id] |
| 131 | assert obj.id == lookup.id |
| 132 | |
| 133 | for commit in testrepo.walk(testrepo.head.target): |
| 134 | test_obj(commit, f'commit#{commit.id}') |
no test coverage detected
searching dependent graphs…