diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2017-09-28 15:44:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-28 15:44:15 +0200 |
commit | 2eb6cf0855232da2b8f37785677d1f58c8e86817 (patch) | |
tree | ecb856bea6ed63e9c2baf8365a4e0a9030b0b3a3 /git/__init__.py | |
parent | 2af601d5800a39ab04e9fe6cf22ef7b917ab5d67 (diff) | |
parent | a56136f9cb48a17ae15b59ae0f3f99d9303b1cb1 (diff) | |
download | gitpython-2eb6cf0855232da2b8f37785677d1f58c8e86817.tar.gz |
Merge pull request #640 from njalerikson/adding_setup_for_git_executable
Adding setup for git executable
Diffstat (limited to 'git/__init__.py')
-rw-r--r-- | git/__init__.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/git/__init__.py b/git/__init__.py index 75247dbf..74609e79 100644 --- a/git/__init__.py +++ b/git/__init__.py @@ -60,3 +60,24 @@ except GitError as exc: __all__ = [name for name, obj in locals().items() if not (name.startswith('_') or inspect.ismodule(obj))] + + +#{ Initialize git executable path +GIT_OK = None + +def refresh(path=None): + """Convenience method for setting the git executable path.""" + global GIT_OK + GIT_OK = False + + if not Git.refresh(path=path): + return + if not FetchInfo.refresh(): + return + + GIT_OK = True +#} END initialize git executable path + +################# +refresh() +################# |