Skip to content

fix (core): Multiple clones of same repo are different projects - #29869#35311

Draft
belisoful wants to merge 5 commits into
anomalyco:devfrom
belisoful:dev
Draft

fix (core): Multiple clones of same repo are different projects - #29869#35311
belisoful wants to merge 5 commits into
anomalyco:devfrom
belisoful:dev

Conversation

@belisoful

@belisoful belisoful commented Jul 4, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #17940 #19348 #29869 #29871 #29962 #29936 #29977 #30302 #31593 #31686 #31890 #32785 #32801 #33313 #33615

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

This PR changes .git/opencode from the hash of the repo name to json; with a version and UUID. This UUID per repo-clone (locally) satisfies work trees being keyed to their respective repo-clones and separating repo-clones from each other (locally).

How did you verify your code works?

  • New unit tests to verify behavior.
  • GUI test for Open Project on already open project, regression passed.
  • GUI test for Open Project on the same repo cloned in two different locations do open in separate projects.

Screenshots / recordings

N/A

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions Bot added needs:title needs:compliance This means the issue will auto-close after 2 hours. labels Jul 4, 2026
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Hey! Your PR title Multiple clones of same repo are different projects - Fixes: #29869 doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

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

Based on my search results, I found a related PR:

Potential Related PR:

  • PR fix(project): repair split project IDs across worktrees #14287 - fix(project): repair split project IDs across worktrees
    • This PR appears to address a similar concern about worktrees and project ID separation, which is related to the core issue of distinguishing multiple clones of the same repository as different projects.

Note: PR #29977 (fix(core): include git store hash in project ID to distinguish indepe…) also appeared in results but may be an older or related attempt at solving a similar problem.

The current PR (#35311) appears to be focused specifically on changing .git/opencode to store JSON with a version and UUID to uniquely identify repo clones, which is a different approach to solving the worktree/project separation problem that PR #14287 addresses.

@belisoful belisoful changed the title Multiple clones of same repo are different projects - Fixes: #29869 fix: Multiple clones of same repo are different projects - #29869 Jul 4, 2026
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Jul 4, 2026
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@belisoful

belisoful commented Jul 6, 2026

Copy link
Copy Markdown
Author

I did a GUI test to check that different clones of the same repo are separate "projects".
"Open Project" on an existing repo-clone brings up that repo-clone, like before.

I wanted to actually do a real test myself before submitting this PR.

We are seeing this issue re-listed over and over.

@belisoful belisoful marked this pull request as ready for review July 6, 2026 04:32
@belisoful belisoful changed the title fix: Multiple clones of same repo are different projects - #29869 fix (projects): Multiple clones of same repo are different projects - #29869 Jul 6, 2026
@belisoful belisoful changed the title fix (projects): Multiple clones of same repo are different projects - #29869 fix (core): Multiple clones of same repo are different projects - #29869 Jul 6, 2026
@belisoful belisoful marked this pull request as draft July 6, 2026 08:43
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.

Multiple local clones of same repo share one project identity, breaking file change tracking

1 participant