FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

test: cover subdirectory discovery and pathspec commands in bare-repository worktrees by christianvuerings · Pull Request #2228 · gitpython-developers/GitPython · GitHub

Repository navigation

test: cover subdirectory discovery and pathspec commands in bare-repository worktrees - #2228

Merged
Byron merged 3 commits into
gitpython-developers:mainfrom
christianvuerings:test-bare-worktree-subdir-discovery
Sep 7, 2026
Merged

Byron merged 3 commits into
gitpython-developers:mainfrom
christianvuerings:test-bare-worktree-subdir-discovery

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:

  1. 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;

  2. 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.

christianvuerings marked this pull request as ready for review September 6, 2026 23:34
Byron merged commit 41c3954 into gitpython-developers:main Sep 7, 2026
53 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL