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

Function test_refs_set_sha

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

Source from the content-addressed store, hash-verified

96
97
98def test_refs_set_sha(testrepo: Repository) -> None:
99 NEW_COMMIT = '5ebeeebb320790caf276b9fc8b24546d63316533'
100 reference = testrepo.references.get('refs/heads/master')
101 assert reference is not None
102 reference.set_target(NEW_COMMIT)
103 assert reference.target == NEW_COMMIT
104
105
106def test_refs_set_sha_prefix(testrepo: Repository) -> None:

Callers

nothing calls this directly

Calls 2

set_targetMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…