diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2016-06-14 07:38:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-14 07:38:26 +0200 |
commit | d22c40b942cca16ff9e70d879b669c97599406b7 (patch) | |
tree | c096676b530c03d941ec7d053cbba5b65b39e556 /git/diff.py | |
parent | 4510b3c42b85305c95c1f39be2b9872be52c2e5e (diff) | |
parent | 200d3c6cb436097eaee7c951a0c9921bfcb75c7f (diff) | |
download | gitpython-d22c40b942cca16ff9e70d879b669c97599406b7.tar.gz |
Merge pull request #467 from gitpython-developers/fix-dont-choke-on-invalid-unicode-paths
Don't choke on (legitimately) invalidly encoded Unicode paths
Diffstat (limited to 'git/diff.py')
-rw-r--r-- | git/diff.py | 8 |
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 |