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

Function test_reference_set_sha

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

Source from the content-addressed store, hash-verified

543
544
545def test_reference_set_sha(testrepo: Repository) -> None:
546 NEW_COMMIT = '5ebeeebb320790caf276b9fc8b24546d63316533'
547 reference = testrepo.lookup_reference('refs/heads/master')
548 reference.set_target(NEW_COMMIT)
549 assert reference.target == NEW_COMMIT
550
551
552def test_reference_set_sha_prefix(testrepo: Repository) -> None:

Callers

nothing calls this directly

Calls 1

set_targetMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…