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

Function test_get_shorthand

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

Source from the content-addressed store, hash-verified

577
578
579def test_get_shorthand(testrepo: Repository) -> None:
580 reference = testrepo.lookup_reference('refs/heads/master')
581 assert reference.shorthand == 'master'
582 reference = testrepo.create_reference('refs/remotes/origin/master', LAST_COMMIT)
583 assert reference.shorthand == 'origin/master'
584
585
586def test_set_target_with_message(testrepo: Repository) -> None:

Callers

nothing calls this directly

Calls 1

create_referenceMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…