◐ Shell
clean mode source ↗

Fix the `git version` parser. by maxyz · Pull Request #195 · gitpython-developers/GitPython

Expand Up @@ -236,7 +236,7 @@ def _set_cache_(self, attr): if attr == '_version_info': # We only use the first 4 numbers, as everthing else could be strings in fact (on windows) version_numbers = self._call_process('version').split(' ')[2] self._version_info = tuple(int(n) for n in version_numbers.split('.')[:4]) self._version_info = tuple(int(n) for n in version_numbers.split('.')[:4] if n.isdigit()) else: super(Git, self)._set_cache_(attr) #END handle version info Expand Down