2
0
Эх сурвалжийг харах

Remove unnecessary abspath calls.

Jelmer Vernooij 6 жил өмнө
parent
commit
2072f5194b
1 өөрчлөгдсөн 0 нэмэгдсэн , 4 устгасан
  1. 0 4
      dulwich/porcelain.py

+ 0 - 4
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')