Uh oh!
There was an error while loading. Please reload this page.
fix(opencode): resolve git worktree .git files - #7517
Conversation
## Summary - Read .git files and follow `gitdir:` references to actual git directory - Handles both absolute and relative paths - Falls back gracefully when target doesn't exist ## Why Git worktrees create a `.git` file (not directory) containing a path to the actual git directory. Without following this reference, project resolution could fail or be slower in worktree scenarios. ## Testing - Added test for absolute gitdir path resolution - Added test for relative gitdir path resolution - Added test for non-existent target fallback
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
The following comment was made by an LLM, it may be inaccurate: Based on my search, I found several potentially related PRs that might be addressing similar git-related issues: Related PRs (Not Direct Duplicates)
These PRs touch on worktree and git path handling, but none appear to be direct duplicates of PR #7517. Your PR (#7517) specifically addresses the performance issue of resolving |
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
f1ae801 to
08fa7f7CompareClosing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR. |
What does this PR do?
gitdir:references to actual git directoryWhy?
Git worktrees create a
.gitfile (not directory) containing a path to the actual git directory. Without following this reference, the code fails to store the cached ID, which slows down subsequent startups.How did you verify your code works?