Repository navigation
Fix Git for Claude worktrees under reserved paths - #4849
Conversation
Git links failed when the checkout or shared Git data overlapped a container mount. Keep the relative layout at a separate mount path and preserve the workspace and settings mounts. Run the shell tests in CI and exercise the reserved paths with real Git operations in a disposable container. Signed-off-by: Vitor Bandeira <vvbandeira@precisioninno.com>
The checkout mount already includes nested Git data. Translate the gitfile when the original checkout path is hidden. Verify a commit through a named ref in each Git fixture. Signed-off-by: Vitor Bandeira <vvbandeira@precisioninno.com>
Forward signals to Docker and wait before removing the temporary Git pointer. Check pointer cleanup in the worktree fixture and explain which path to use for Git commands in submodules. Signed-off-by: Vitor Bandeira <vvbandeira@precisioninno.com>
There was a problem hiding this comment.
Code Review
This pull request enhances claude.sh to support Git worktrees and submodules when host paths overlap reserved container mounts (like /workspace or /home/claude-user) by relocating them under /tmp/claude-worktree and overlaying the .git file via a temporary read-only bind mount. It also introduces a comprehensive integration test suite in docker/test-claude-worktree-paths.sh to verify these scenarios and updates the documentation in docs/user/ClaudeCode.md. There are no review comments, and I have no feedback to provide.
The test shim looked up Docker on a PATH where the shim came first. Resolve the engine before adding the shim so the CI job can run. Set a job timeout to bound a stalled container test. Signed-off-by: Vitor Bandeira <vvbandeira@precisioninno.com>
Hosted CI can write inside /workspace but cannot remove the root directory as the runner user. Remove the known fixture files and let the existing exit trap clean the temporary Git repository. Signed-off-by: Vitor Bandeira <vvbandeira@precisioninno.com>
🔍 QoR checkMetrics reflect the PR merge build — i.e. what will land on the target branch. Commit 62 design(s) checked — 0 with regression(s), 2 without a comparable baseline. |
3a6dfff
into
The-OpenROAD-Project:master
When a linked worktree or its Git data is under
/workspaceor/home/claude-user, the wrapper skips the Git mounts and Git cannot open the checkout.Use a separate mount prefix when the host paths would collide with container mounts.
Keep the relative layout that Git submodules use and keep the workspace, settings, and cache mounts available.
Add regression tests that run Git in disposable containers.
Run the wrapper, entrypoint, and worktree tests in GitHub Actions.