Skip to content

fix(snapshot): use worktree root as cwd for git operations#29374

Closed
SpencerJung wants to merge 1 commit into
anomalyco:devfrom
SpencerJung:fix/27688-snapshot-cwd
Closed

fix(snapshot): use worktree root as cwd for git operations#29374
SpencerJung wants to merge 1 commit into
anomalyco:devfrom
SpencerJung:fix/27688-snapshot-cwd

Conversation

@SpencerJung
Copy link
Copy Markdown

Fixes #27688. Changes cwd from state.directory to state.worktree in ignore, drop, and stage functions so that git commands resolve paths correctly when opencode is opened from a subdirectory.

@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label May 26, 2026
@github-actions
Copy link
Copy Markdown
Contributor

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions
Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

I found potential duplicate PRs related to this issue:

  1. PR fix(snapshot): run git from worktree, not launch directory #27737: fix(snapshot): run git from worktree, not launch directory

  2. PR snapshot: fix cwd for git commands in subdirs #28131: snapshot: fix cwd for git commands in subdirs

Both of these PRs appear to be addressing the exact same issue (#27688) related to git operations and worktree/subdirectory path resolution.

@github-actions
Copy link
Copy Markdown
Contributor

This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

Feel free to open a new pull request that follows our guidelines.

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label May 26, 2026
@github-actions github-actions Bot closed this May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Snapshot fails when opencode is opened in a git subdirectory (snapshot service cwd mismatch)

1 participant