Merge branch 'main' of github.com:Aider-AI/aider

This commit is contained in:
Paul Gauthier 2024-12-26 10:12:36 -05:00
commit 44f2cf2b24
2 changed files with 46 additions and 0 deletions

View file

@ -393,6 +393,12 @@ def sanity_check_repo(repo, io):
if not repo.git_repo_error:
return True
error_msg = str(repo.git_repo_error)
except UnicodeDecodeError as exc:
error_msg = (
f"Failed to read the Git repository. This issue is likely caused by a path encoded "
f"in a format different from the expected encoding \"{sys.getfilesystemencoding()}\".\n"
f"Internal error: {str(exc)}"
)
except ANY_GIT_ERROR as exc:
error_msg = str(exc)
bad_ver = "version in (1, 2)" in error_msg