We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca06b11 commit 4674059Copy full SHA for 4674059
git/index/base.py
@@ -653,7 +653,7 @@ def _to_relative_path(self, path: PathLike) -> PathLike:
653
returnpath
654
ifself.repo.bare:
655
raiseInvalidGitRepositoryError("require non-bare repository")
656
-ifnotosp.normpath(str(path)).startswith(osp.normpath(str(self.repo.working_tree_dir))):
+ifnotosp.normpath(str(path)).startswith(str(self.repo.working_tree_dir)):
657
raiseValueError("Absolute path %r is not in git repository at %r"% (path, self.repo.working_tree_dir))
658
returnos.path.relpath(path, self.repo.working_tree_dir)
659
0 commit comments