Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitebf4656

Browse files
ulturtByron
authored andcommitted
Fix#920
1 parent87a103d commitebf4656

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

‎git/cmd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ def wait(self, stderr=b''): # TODO: Bad choice to mimic `proc.wait()` but with
401401
:raise GitCommandError: if the return status is not 0"""
402402
ifstderrisNone:
403403
stderr=b''
404-
stderr=force_bytes(stderr)
404+
stderr=force_bytes(data=stderr,encoding='utf-8')
405405

406406
status=self.proc.wait()
407407

‎git/test/test_repo.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,20 @@ def test_clone_from_pathlib_withConfig(self, rw_dir):
245245
assert_equal(cloned.config_reader().get_value('core','filemode'),False)
246246
assert_equal(cloned.config_reader().get_value('submodule "repo"','update'),'checkout')
247247

248+
deftest_clone_from_with_path_contains_unicode(self):
249+
withtempfile.TemporaryDirectory()astmpdir:
250+
unicode_dir_name='\u0394'
251+
path_with_unicode=os.path.join(tmpdir,unicode_dir_name)
252+
os.makedirs(path_with_unicode)
253+
254+
try:
255+
Repo.clone_from(
256+
url=self._small_repo_url(),
257+
to_path=path_with_unicode,
258+
)
259+
exceptUnicodeEncodeError:
260+
self.fail('Raised UnicodeEncodeError')
261+
248262
@with_rw_repo('HEAD')
249263
deftest_max_chunk_size(self,repo):
250264
classTestOutputStream(object):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp