From 0574c6047a1fa393db8200cb544ccd2c2f4ef124 Mon Sep 17 00:00:00 2001 From: Davide Spadini Date: Tue, 10 Nov 2020 15:21:56 +0100 Subject: [PATCH] change decode type and add replace flag --- git/diff.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/diff.py b/git/diff.py index 567e3e70c..0fc30b9eb 100644 --- a/git/diff.py +++ b/git/diff.py @@ -275,7 +275,7 @@ def __init__(self, repo, a_rawpath, b_rawpath, a_blob_id, b_blob_id, a_mode, # we need to overwrite "repo" to the corresponding submodule's repo instead if repo and a_rawpath: for submodule in repo.submodules: - if submodule.path == a_rawpath.decode("utf-8"): + if submodule.path == a_rawpath.decode(defenc, 'replace'): if submodule.module_exists(): repo = submodule.module() break