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:
8d82f4f
)
Remove unnecessary abspath calls.
author
Jelmer Vernooij
<jelmer@jelmer.uk>
Wed, 18 Jul 2018 10:12:23 +0000
(11:12 +0100)
committer
Jelmer Vernooij
<jelmer@jelmer.uk>
Wed, 18 Jul 2018 10:12:23 +0000
(11:12 +0100)
dulwich/porcelain.py
patch
|
blob
|
history
diff --git
a/dulwich/porcelain.py
b/dulwich/porcelain.py
index b2123b38858e6396d70985467d89606e4e4ac5a2..3cdade85b913ca092c239d41d9f1df62339cab89 100644
(file)
--- a/
dulwich/porcelain.py
+++ b/
dulwich/porcelain.py
@@
-185,10
+185,6
@@
def path_to_tree_path(repopath, path):
path = path.encode(sys.getfilesystemencoding())
if not isinstance(repopath, bytes):
repopath = repopath.encode(sys.getfilesystemencoding())
- if os.path.isabs(path) and not os.path.isabs(repopath):
- repopath = os.path.abspath(repopath)
- elif os.path.isabs(repopath) and not os.path.isabs(path):
- path = os.path.abspath(path)
treepath = os.path.relpath(path, repopath)
if treepath.startswith(b'..'):
raise ValueError('Path not in repo')