Address review feedback about dangling commondir · gitpython-developers/GitPython@83c3e64 · GitHub
Skip to content

Commit 83c3e64

Browse files
codexByron
authored andcommitted
Address review feedback about dangling commondir
Review feedback noted that a dangling commondir symlink was treated as absent, allowing local objects and refs to validate the repository. Distinguish a truly missing commondir from a dangling symlink. This follows Git's get_common_dir_noenv(), whose file_exists check uses lstat before attempting to read the entry. Git baseline: 15c6308cf7ad276b306aa5b3ababfbdebfb1a917, setup.c get_common_dir_noenv() and dir.c file_exists(). Validation: 8 focused tests and 12 subtests; Ruff check and format; mypy; compileall; git diff --check.
1 parent b8c000e commit 83c3e64

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

git/repo/fun.py

Lines changed: 4 additions & 1 deletion

test/test_repo.py

Lines changed: 11 additions & 0 deletions

0 commit comments

Comments
 (0)