Keep bare-repository worktrees non-bare by Byron · Pull Request #2224 · gitpython-developers/GitPython
Tasks This section is for Byron only. Models continuing this PR must not add, remove, check, uncheck, rename, or reorder checkboxes here. refackiew Everything below this line was generated by Codex GPT-5. Created by Codex on behalf of Byron. Byron will review before this is ready to merge. Fixes #2223 Summary Keep linked worktrees non-bare when their common repository has core.bare enabled. Preserve the discovered working_tree_dir so index operations can use the checkout. Add a regression test comparing Repo with native git rev-parse behavior. Git reference Git 2.50.1 reports the linked checkout as non-bare. The implementation was checked against Git source baseline 0bd5a6920d7c4238e0d90ddc0e7e08866e84a0f1, notably environment.c is_bare_repository() and setup.c check_repository_format_gently(). Commits d3cb53c fix: keep bare-repository worktrees non-bare (#2223) 4a6b2f3 test: skip bare worktree regression on old Git Validation 12 focused repository-discovery/worktree tests passed. 7 test_base.py tests passed. Ruff check, Ruff format check, and codespell passed. Full test_repo.py probe: 90 passed and 2 skipped; 4 unrelated host-state failures remain in tests that assume a master default branch, core.quotePath defaults, or no extra refs in the source repository.
Skip to content