revert util.expand_path() due to regression#1240
Merged
Byron merged 1 commit intogitpython-developers:mainfrom May 14, 2021
Yobmod:addtypes
Merged
revert util.expand_path() due to regression#1240Byron merged 1 commit intogitpython-developers:mainfrom Yobmod:addtypes
Byron merged 1 commit intogitpython-developers:mainfrom
Yobmod:addtypes
Conversation
Member
|
Thanks for the fix! What I understand is that the try-catch block has to be entered with It's quite amazing how GitPython seems to be at a state where minor changes will break someone, somewhere, under certain situations like multi-threading. It's a little frightening too. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)