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

Function test_rename

test/test_refdb_backend.py:105–112  ·  view source on GitHub ↗
(repo: Repository)

Source from the content-addressed store, hash-verified

103
104
105def test_rename(repo: Repository) -> None:
106 old_ref = repo.backend.lookup('refs/heads/i18n')
107 target = repo.get(old_ref.target)
108 assert isinstance(target, Commit)
109 repo.backend.rename(
110 'refs/heads/i18n', 'refs/heads/intl', False, target.committer, target.message
111 )
112 assert repo.backend.lookup('refs/heads/intl').target == target.id
113
114
115def test_delete(repo: Repository) -> None:

Callers

nothing calls this directly

Calls 3

lookupMethod · 0.80
getMethod · 0.45
renameMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…