summaryrefslogtreecommitdiff
path: root/git/__init__.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2017-09-28 15:44:55 +0200
committerGitHub <noreply@github.com>2017-09-28 15:44:55 +0200
commit2e482a20ab221cb6eca51f12f1bd29cda4eec484 (patch)
tree1e07af3b22ba20b59dadd4a5b8008a3217c40bb5 /git/__init__.py
parent58998fb2dd6a1cad5faffdc36ae536ee6b04e3d2 (diff)
parent2eb6cf0855232da2b8f37785677d1f58c8e86817 (diff)
downloadgitpython-2e482a20ab221cb6eca51f12f1bd29cda4eec484.tar.gz
Merge branch 'master' into master
Diffstat (limited to 'git/__init__.py')
-rw-r--r--git/__init__.py21
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()
+#################