'Read a reference without following any references.
:param refname: The name of the reference
:return: The contents of the ref file, or None if it does
not exist.'

def read_ref(self, refname):

    contents = self.read_loose_ref(refname)
    if (not contents):
        contents = self.get_packed_refs().get(refname, None)
    return contents
