Commit c0ed846
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 675df36 commit c0ed846
2 files changed
Lines changed: 11 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
416 | 416 | | |
417 | 417 | | |
418 | 418 | | |
419 | | - | |
420 | 419 | | |
421 | | - | |
422 | | - | |
423 | | - | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
424 | 427 | | |
425 | 428 | | |
426 | 429 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1385 | 1385 | | |
1386 | 1386 | | |
1387 | 1387 | | |
1388 | | - | |
| 1388 | + | |
1389 | 1389 | | |
1390 | | - | |
| 1390 | + | |
| 1391 | + | |
1391 | 1392 | | |
1392 | 1393 | | |
1393 | 1394 | | |
| |||
1397 | 1398 | | |
1398 | 1399 | | |
1399 | 1400 | | |
1400 | | - | |
| 1401 | + | |
1401 | 1402 | | |
1402 | 1403 | | |
1403 | 1404 | | |
| |||
0 commit comments