summaryrefslogtreecommitdiff
path: root/git/diff.py
diff options
context:
space:
mode:
authorVincent Driessen <me@nvie.com>2016-06-06 12:13:37 +0200
committerVincent Driessen <me@nvie.com>2016-06-06 12:16:11 +0200
commit200d3c6cb436097eaee7c951a0c9921bfcb75c7f (patch)
tree21d527d7aabf268b35ccdff9f0c57dbce1430fd5 /git/diff.py
parente0b21f454ea43a5f67bc4905c641d95f8b6d96fd (diff)
downloadgitpython-fix-dont-choke-on-invalid-unicode-paths.tar.gz
Don't choke on (legitimately) invalidly encoded Unicode pathsfix-dont-choke-on-invalid-unicode-paths
Diffstat (limited to 'git/diff.py')
-rw-r--r--git/diff.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/git/diff.py b/git/diff.py
index 9073767e..aeaa67d5 100644
--- a/git/diff.py
+++ b/git/diff.py
@@ -404,15 +404,15 @@ class Diff(object):
a_mode = old_mode or deleted_file_mode or (a_path and (b_mode or new_mode or new_file_mode))
b_mode = b_mode or new_mode or new_file_mode or (b_path and a_mode)
index.append(Diff(repo,
- a_path and a_path.decode(defenc),
- b_path and b_path.decode(defenc),
+ a_path and a_path.decode(defenc, 'replace'),
+ b_path and b_path.decode(defenc, 'replace'),
a_blob_id and a_blob_id.decode(defenc),
b_blob_id and b_blob_id.decode(defenc),
a_mode and a_mode.decode(defenc),
b_mode and b_mode.decode(defenc),
new_file, deleted_file,
- rename_from and rename_from.decode(defenc),
- rename_to and rename_to.decode(defenc),
+ rename_from and rename_from.decode(defenc, 'replace'),
+ rename_to and rename_to.decode(defenc, 'replace'),
None))
previous_header = header