':type ref: str
:rtype: bool'

def is_valid_ref(self, ref):

    cmd = ['show', ref]
    try:
        self.run_git(cmd, str_errors='replace')
        return True
    except SubprocessError:
        return False
