Fix GitError being raised in initial `import git` by terminalmage · Pull Request #658 · gitpython-developers/GitPython
This catches any raise of one of the custom exceptions defined in `git.exc` during the imports in the dunder init, and raises an `ImportError` in those cases.
terminalmage added a commit to terminalmage/GitPython that referenced this pull request
Jun 1, 2018This is related to my fix in gitpython-developers#658. Apparently, MacOS adds a git executable that is just a stub which displays an error. This gets past the try/except I added in gitpython-developers#658, and allows all of the GitPython components to be imported, but since the executable is not *actually* git, it results in an exception when ``refresh()`` attemepts to run a ``git version``.
This was referenced
Jun 1, 2018Byron pushed a commit that referenced this pull request
Jun 5, 2018This is related to my fix in #658. Apparently, MacOS adds a git executable that is just a stub which displays an error. This gets past the try/except I added in #658, and allows all of the GitPython components to be imported, but since the executable is not *actually* git, it results in an exception when ``refresh()`` attemepts to run a ``git version``.
riley-martine pushed a commit to riley-martine/GitPython that referenced this pull request
Dec 7, 2023riley-martine pushed a commit to riley-martine/GitPython that referenced this pull request
Dec 7, 2023This is related to my fix in gitpython-developers#658. Apparently, MacOS adds a git executable that is just a stub which displays an error. This gets past the try/except I added in gitpython-developers#658, and allows all of the GitPython components to be imported, but since the executable is not *actually* git, it results in an exception when ``refresh()`` attemepts to run a ``git version``.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters