Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: gitpython-developers/GitPython
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: b2d3d01c8b2eac23ad8f4bef5f69f6953b66afbc
Choose a base ref
..
head repository: gitpython-developers/GitPython
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a56113e7eb40c6c793661a8e9b567a1fa3d7f6b8
Choose a head ref
Showing with 2 additions and 2 deletions.
  1. +2 −2 git/refs/symbolic.py
4 changes: 2 additions & 2 deletions git/refs/symbolic.py
Original file line number Diff line number Diff line change
@@ -174,8 +174,8 @@ def _get_ref_info_helper(
try:
# Make path absolute, resolving any symlinks, and check that we are still
# inside the repository
full_ref_path = Path(repodir, str(ref_path)).resolve(strict=True)
if Path(repodir) not in full_ref_path.parents:
full_ref_path = Path(repodir, str(ref_path)).resolve()
if Path(repodir).resolve() not in full_ref_path.parents:
raise ValueError(f"Reference at {full_ref_path} is outside the repo directory")

with open(full_ref_path, "rt", encoding="UTF-8") as fp: