Skip to content

Commit 4674059

Browse files
committed
Remove redundant path normalization for working_tree_dir
1 parent ca06b11 commit 4674059

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git/index/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ def _to_relative_path(self, path: PathLike) -> PathLike:
653653
return path
654654
if self.repo.bare:
655655
raise InvalidGitRepositoryError("require non-bare repository")
656-
if not osp.normpath(str(path)).startswith(osp.normpath(str(self.repo.working_tree_dir))):
656+
if not osp.normpath(str(path)).startswith(str(self.repo.working_tree_dir)):
657657
raise ValueError("Absolute path %r is not in git repository at %r" % (path, self.repo.working_tree_dir))
658658
return os.path.relpath(path, self.repo.working_tree_dir)
659659

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy