def GetGitMirror(self, remote='origin'):
    'If this checkout is from a local git mirror, return a Mirror object.'
    local_url = RunGit(['config', '--get', ('remote.%s.url' % remote)]).strip()
    if (not os.path.isdir(local_url)):
        return None
    git_cache.Mirror.SetCachePath(os.path.dirname(local_url))
    remote_url = git_cache.Mirror.CacheDirToUrl(local_url)
    mirror = git_cache.Mirror(remote_url, print_func=(lambda *args: None))
    if mirror.exists():
        return mirror
    return None
If this checkout is from a local git mirror, return a Mirror object.
def GetGitMirror(self, remote='origin'):
    
    local_url = RunGit(['config', '--get', ('remote.%s.url' % remote)]).strip()
    if (not os.path.isdir(local_url)):
        return None
    git_cache.Mirror.SetCachePath(os.path.dirname(local_url))
    remote_url = git_cache.Mirror.CacheDirToUrl(local_url)
    mirror = git_cache.Mirror(remote_url, print_func=(lambda *args: None))
    if mirror.exists():
        return mirror
    return None