(cls, sha1, repo)
return matching
Returns all refs pointing to the given SHA1.
Returns all refs pointing to the given SHA1.
Returns all refs pointing to the given SHA1 .
def refs_to(cls, sha1, repo):
        """Returns all refs pointing to the given SHA1."""
        matching = []
        for refname in repo.listall_references():
            symref = repo.lookup_reference(refname)
            dref = symref.resolve()
            oid = dref.target
            commit = repo.get(oid)
            if commit.hex == sha1:
                matching.append(symref.shorthand)

        return matching
def refs_to ( cls , sha1 , repo ) : matching = [ ] for refname in repo . listall_references ( ) : symref = repo . lookup_reference ( refname ) dref = symref . resolve ( ) oid = dref . target commit = repo . get ( oid ) if commit . hex == sha1 : matching . append ( symref . shorthand ) return matching