[PR #2862] Fix relative paths for getGitFiles #10465

Closed
opened 2026-02-16 18:15:07 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/2862

State: closed
Merged: No


Problem

When working in a large monorepo, sometimes we open opencode from a sub package rather than from the github repository root. If you select a file with @ files with git diffs will show at the top, but they are relative to the git repository root and not to the current working directory, so the file path that gets read is incorrect.

Fix

By using the relative path based on the working directory, opencode successfully reads the file from the git diff selection.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/2862 **State:** closed **Merged:** No --- ## Problem When working in a large monorepo, sometimes we open opencode from a sub package rather than from the github repository root. If you select a file with `@` files with git diffs will show at the top, but they are relative to the git repository root and not to the current working directory, so the file path that gets read is incorrect. ## Fix By using the relative path based on the working directory, opencode successfully reads the file from the git diff selection.
yindo added the pull-request label 2026-02-16 18:15:07 -05:00
yindo closed this issue 2026-02-16 18:15:07 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#10465