Match Git submodule symlink validation · gitpython-developers/GitPython@dcd956a · GitHub
Skip to content

Commit dcd956a

Browse files
codexByron
authored andcommitted
Match Git submodule symlink validation
Replace resolved-path containment with Git-compatible component validation: normalize and confine the checkout path, then reject every existing symlink component before filesystem use. This follows git.git commit e8d0608944 (validate_submodule_path) and t/t7423-submodule-symlinks.sh, including rejection of symlinks that still resolve inside the worktree. Validation: .venv/bin/python -m pytest test/test_submodule.py -q; focused path regressions; pre-commit run --files git/objects/submodule/base.py test/test_submodule.py; mypy git/objects/submodule/base.py; git diff --check.
1 parent 914a4ae commit dcd956a

2 files changed

Lines changed: 11 additions & 7 deletions

File tree

git/objects/submodule/base.py

Lines changed: 7 additions & 4 deletions

test/test_submodule.py

Lines changed: 4 additions & 3 deletions

0 commit comments

Comments
 (0)