Repository navigation
fix(codex): resolve linked-worktree git directories - #126
Merged
Merged
Conversation
…dir (#121) In a linked git worktree <cwd>/.git is a file, and passing it to Codex as --add-dir breaks the Linux sandbox for every command. The fresh launch now resolves the git metadata directories: an ordinary repository keeps <cwd>/.git; a .git file resolves through git rev-parse to the worktree git dir and the common git dir (existing directories only); anything unresolvable adds nothing. A missing .git keeps the previous argument. Resume and fork are unchanged. Reported with a reproduction and the suggested rev-parse approach by mgall-ibizdigital in #121.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
mvschwarz
marked this pull request as ready for review
September 29, 2026 08:54
AlephCasara
pushed a commit
to AlephCasara/openrig
that referenced
this pull request
Nov 10, 2026
…dir (mvschwarz#121) (mvschwarz#126) In a linked git worktree <cwd>/.git is a file, and passing it to Codex as --add-dir breaks the Linux sandbox for every command. The fresh launch now resolves the git metadata directories: an ordinary repository keeps <cwd>/.git; a .git file resolves through git rev-parse to the worktree git dir and the common git dir (existing directories only); anything unresolvable adds nothing. A missing .git keeps the previous argument. Resume and fork are unchanged. Reported with a reproduction and the suggested rev-parse approach by mgall-ibizdigital in mvschwarz#121. Co-authored-by: orch-advisor <orch-advisor@openrig-build>
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses #121. Codex fresh launches currently add
<cwd>/.gitas a writable directory even when a linked worktree stores it as a file.git rev-parse; pass only existing directories, de-duplicated and shell-quoted..gitbehavior unchanged. Unresolvable metadata gets no extra git-directory access, rather than a file argument.Thanks to @mgall-ibizdigital for the report, reproduction and suggested resolution approach. Their unpublished patch bytes are not used here.
Verification
Draft until hosted CI and portability results have been assessed. No dependency, migration, profile or permission-mode change.
Summary by CodeRabbit