Repository navigation
test: cover subdirectory discovery and pathspec commands in bare-repository worktrees - #2228
Merged
Byron merged 3 commits into
gitpython-developers:main from
christianvuerings:test-bare-worktree-subdir-discovery
Sep 7, 2026
Merged
Conversation
Copy link
Copy Markdown
Contributor
Follow-up to #2223 / #2224 , which fixed Repo treating a linked worktree of a bare repository as bare. The existing regression test checks repo.bare and working_tree_dir when Repo() is opened on the worktree root. This adds the two steps that actually broke for us in 3.1.61 and are not exercised yet:
-
discovery from a subdirectory with search_parent_directories=True (how tools such as mkdocs-git-revision-date-localized-plugin open the repo), asserting working_dir is the worktree rather than the bare common dir;
-
running a git command with an absolute pathspec through repo.git, which on 3.1.61 failed with:
fatal: '<worktree>/docs' is outside repository at '<bare_repo>/.'
Our CI checks every job out as a linked worktree of a shared bare repository (git --git-dir=<bare> worktree add <job-dir> <sha>), so this was the shape that took down our documentation builds when the build image picked up 3.1.61. The new assertions pass on main (with 180b1ff ) and fail on 3.1.61.
No behavior change; test only.
test: cover subdirectory discovery and pathspec commands in bare-repo...
b754897
... worktrees (gitpython-developers#2223)
christianvuerings
marked this pull request as ready for review
September 6, 2026 23:34
Byron
approved these changes
Sep 7, 2026
View reviewed changes
Byron
added 2 commits
September 7, 2026 04:44
get better commit messages from agents
10ec385
prepare new release
db47516
Byron
merged commit
41c3954
into
gitpython-developers : main
Sep 7, 2026
53 checks passed
Sign up for free
to join this conversation on GitHub .
Already have an account?
Sign in to comment
Labels
None yet
2 participants