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

Function test_merge_already_something_in_index

test/test_merge.py:103–110  ·  view source on GitHub ↗
(mergerepo: Repository)

Source from the content-addressed store, hash-verified

101
102
103def test_merge_already_something_in_index(mergerepo: Repository) -> None:
104 branch_head_hex = '03490f16b15a09913edb3a067a3dc67fbb8d41f1'
105 branch_oid = mergerepo[branch_head_hex].id
106 with (Path(mergerepo.workdir) / 'inindex.txt').open('w') as f:
107 f.write('new content')
108 mergerepo.index.add('inindex.txt')
109 with pytest.raises(pygit2.GitError):
110 mergerepo.merge(branch_oid)
111
112
113def test_merge_no_fastforward_conflicts(mergerepo: Repository) -> None:

Callers

nothing calls this directly

Calls 4

openMethod · 0.80
mergeMethod · 0.80
writeMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…