diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2016-10-16 14:34:03 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2016-10-16 14:34:03 +0200 |
commit | 93d530234a4f5533aa99c3b897bb56d375c2ae60 (patch) | |
tree | 3ac26de9dcd1cc918dbe12034616398de4338ff7 /git/test/performance/test_commit.py | |
parent | ff389af9374116c47e3dc4f8a5979784bf1babff (diff) | |
download | gitpython-93d530234a4f5533aa99c3b897bb56d375c2ae60.tar.gz |
fix(unicode): use surrogateescape in bytes.decode
That way, we will try to decode as default encoding (usually
utf-8), but allow ourselves to simply keep bytes that don't
match within the resulting unicode string.
That way, we allow for lossless decode/encode cycles while still
assuring that decoding never fails.
NOTE: I was too lazy to create a test that would verify it, but manually
executed https://github.com/petertodd/gitpython-unicode-error.
fixes #532
Diffstat (limited to 'git/test/performance/test_commit.py')
-rw-r--r-- | git/test/performance/test_commit.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/git/test/performance/test_commit.py b/git/test/performance/test_commit.py index c60dc2fc..322d3c9f 100644 --- a/git/test/performance/test_commit.py +++ b/git/test/performance/test_commit.py @@ -52,7 +52,7 @@ class TestPerformance(TestBigRepoRW): # END for each object # END for each commit elapsed_time = time() - st - print("Traversed %i Trees and a total of %i unchached objects in %s [s] ( %f objs/s )" + print("Traversed %i Trees and a total of %i uncached objects in %s [s] ( %f objs/s )" % (nc, no, elapsed_time, no / elapsed_time), file=sys.stderr) def test_commit_traversal(self): |