◐ Shell
clean mode source ↗

revert util.expand_path() due to regression by Yobmod · Pull Request #1240 · gitpython-developers/GitPython

Hopefully to fix #1238.

The orginal change (commit 39eb0e6) was attempting to get mypy consistant with expand_path(None), as it doesn't like try except blocks without some type narrowing and expanduser doesn't accept None (triggering the Exception). Added mypy ignores for now, to allow CI to pass.

It passes tests either way, so can't be sure, but the traceback points to an overload of cmd.Git.excecute(), wherein cwd = self._working_dir.
That leads to Git.init(), where self._working_dir = expand_user(working_dir)