def repo_path(path = None):

    if not path:
        path = os.getcwd()

    if not path_hash.has_key(path):
        command = "cd %s && git rev-parse --show-toplevel" % path
        try:
            path_hash[path] = os.popen(command).read().strip()
        except:
            sys.exit(1)
            return
    return path_hash[path]
dataset/ETHPy150Open jonmorehouse/vimhub/lib/git.py/repo_path/original