mirror of
https://github.com/mvschwarz/openrig.git
synced 2026-10-02 08:35:15 +08:00
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. Co-authored-by: orch-advisor <orch-advisor@openrig-build>