def __init__(self, path=None):

        epath = os.path.abspath(os.path.expanduser(path or os.getcwd()))

        if not os.path.exists(epath):
            raise NoSuchPathError(epath)

        self.path = None
        curpath = epath
        while curpath:
            if is_git_dir(curpath):
                self.bare = True
                self.path = curpath
                self.wd = curpath
                break
            gitpath = os.path.join(curpath, '.git')
            if is_git_dir(gitpath):
                self.bare = False
                self.path = gitpath
                self.wd = curpath
                break
            curpath, dummy = os.path.split(curpath)
            if not dummy:
                break

        if self.path is None:
           raise InvalidGitRepositoryError(epath)

        self.git = Git(self.wd)
        if not self.bare:
            self.git.extra["env"] = {
                "GIT_WORK_TREE": self.wd,
            }

    # Description property
Get disabled state of named list item in a ListControl.
dataset/ETHPy150Open kergoth/git-origin/git-python/lib/git/repo.py/Repo.__init__--crossover with--dataset/ETHPy150Open deanhiller/databus/webapp/play1.3.x/samples-and-tests/i-am-a-developer/mechanize/ClientForm.py/ListControl.get_item_disabled