Thanks to visit codestin.com Credit goes to github.com
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
return path
654
if self.repo.bare:
655
raise InvalidGitRepositoryError("require non-bare repository")
656
- if not osp.normpath(str(path)).startswith(osp.normpath(str(self.repo.working_tree_dir))):
+ if not osp.normpath(str(path)).startswith(str(self.repo.working_tree_dir)):
657
raise ValueError("Absolute path %r is not in git repository at %r" % (path, self.repo.working_tree_dir))
658
return os.path.relpath(path, self.repo.working_tree_dir)
659
0 commit comments