git.samba.org
/
jelmer
/
dulwich.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
75cd5a8
)
Fix encoding on python 3.
author
Jelmer Vernooij
<jelmer@jelmer.uk>
Sat, 20 Oct 2018 21:51:23 +0000
(21:51 +0000)
committer
Jelmer Vernooij
<jelmer@jelmer.uk>
Sat, 20 Oct 2018 21:51:23 +0000
(21:51 +0000)
dulwich/porcelain.py
patch
|
blob
|
history
diff --git
a/dulwich/porcelain.py
b/dulwich/porcelain.py
index 4569eae84f3e6f1d3ce97c5ee2cc4ac3ece5735e..0e1234b32872afd998759fcac635a222bcf581db 100644
(file)
--- a/
dulwich/porcelain.py
+++ b/
dulwich/porcelain.py
@@
-1401,6
+1401,8
@@
def get_object_by_path(repo, path, committish=None):
with open_repo_closing(repo) as r:
commit = parse_commit(repo, committish)
base_tree = commit.tree
+ if not isinstance(path, bytes):
+ path = path.encode(commit.encoding or DEFAULT_ENCODING)
(mode, sha) = tree_lookup_path(
r.object_store.__getitem__,
base_tree, path)