This is an automated email from the ASF dual-hosted git repository. brondsem pushed a commit to branch db/assert_git_utf8 in repository https://gitbox.apache.org/repos/asf/allura.git
commit f833d91bbb080925ec418d0809a35bb44bec7306 Author: Dave Brondsema <[email protected]> AuthorDate: Wed Jun 7 16:30:27 2023 -0400 Make sure filenames are interpreted as utf8 --- ForgeGit/forgegit/model/git_repo.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ForgeGit/forgegit/model/git_repo.py b/ForgeGit/forgegit/model/git_repo.py index 148d22c24..4979a7dc3 100644 --- a/ForgeGit/forgegit/model/git_repo.py +++ b/ForgeGit/forgegit/model/git_repo.py @@ -16,6 +16,7 @@ # under the License. from __future__ import annotations +import sys import os import shutil import string @@ -49,6 +50,10 @@ if typing.TYPE_CHECKING: log = logging.getLogger(__name__) +assert sys.getfilesystemencoding() == 'utf-8', \ + 'Filesystem encoding is not set to utf-8. You should set https://docs.python.org/3/library/os.html#utf8-mode' + + gitdb.util.mman = gitdb.util.mman.__class__( max_open_handles=128)
