(repo: Repository, branch: Branch, content: str)
| 210 | |
| 211 | def test_conflicts_in_bare_repository(barerepo: Repository) -> None: |
| 212 | def create_conflict_file(repo: Repository, branch: Branch, content: str) -> Oid: |
| 213 | oid = repo.create_blob(content.encode('utf-8')) |
| 214 | tb = repo.TreeBuilder() |
| 215 | tb.insert('conflict', oid, FileMode.BLOB) |
| 216 | tree = tb.write() |
| 217 | |
| 218 | sig = pygit2.Signature('Author', 'author@example.com') |
| 219 | commit = repo.create_commit( |
| 220 | branch.name, sig, sig, 'Conflict', tree, [branch.target] |
| 221 | ) |
| 222 | assert commit is not None |
| 223 | return commit |
| 224 | |
| 225 | head_peeled = barerepo.head.peel() |
| 226 | assert isinstance(head_peeled, Commit) |
no test coverage detected
searching dependent graphs…