'Get the peeled value of a ref.
:param ref: The refname to peel.
:return: The fully-peeled SHA1 of a tag object, after peeling all
intermediate tags; if the original ref does not point to a tag,
this will equal the original SHA1.'

def get_peeled(self, ref):

    cached = self.refs.get_peeled(ref)
    if (cached is not None):
        return cached
    return self.object_store.peel_sha(self.refs[ref]).id
