| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent a25365f commit 5fac8d4
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -100,8 +100,8 @@ def __init__(self, path=None, odbt=DefaultDBType, search_parent_directories=Fals | |||
| 100 | 100 | repo = Repo("$REPOSITORIES/Development/git-python.git") | |
| 101 | 101 | ||
| 102 | 102 | - In *Cygwin*, path may be a `'cygdrive/...'` prefixed path. | |
| 103 | - - If `None, current-directory is used. | ||
| 104 | - - The :envvar:`GIT_DIR` if set and not empty takes precendance over this parameter. | ||
| 103 | + - If it evaluates to false, :envvar:`GIT_DIR` is used, and if this also evals to false, | ||
| 104 | + the current-directory is used. | ||
| 105 | 105 | :param odbt: | |
| 106 | 106 | Object DataBase type - a type which is constructed by providing | |
| 107 | 107 | the directory containing the database objects, i.e. .git/objects. It will | |
@@ -114,7 +114,9 @@ def __init__(self, path=None, odbt=DefaultDBType, search_parent_directories=Fals | |||
| 114 | 114 | :raise InvalidGitRepositoryError: | |
| 115 | 115 | :raise NoSuchPathError: | |
| 116 | 116 | :return: git.Repo """ | |
| 117 | - epath = os.getenv('GIT_DIR') or path or os.getcwd() | ||
| 117 | + epath = path or os.getenv('GIT_DIR') | ||
| 118 | + if not epath: | ||
| 119 | + epath = os.getcwd() | ||
| 118 | 120 | if Git.is_cygwin(): | |
| 119 | 121 | epath = decygpath(epath) | |
| 120 | 122 | epath = _expand_path(epath or path or os.getcwd()) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments