fix(ios): pin a GitHub vault to the branch it was opened on#164
Merged
Conversation
When a repo was opened without an explicit ref (e.g. bare owner/repo), the manifest stored the original nil ref, so each refresh re-resolved to whatever the repo's *current* default branch is. If the owner changed the default branch (main → develop), a later "Refresh from GitHub" would silently pull a different branch into the vault. Now the manifest is pinned to the *resolved* branch name from the initial open, so refreshes always follow the branch you actually opened. The vault directory is still keyed by the original link, so dedupe/open resolve to the same folder; the only visible change is the slug now reads owner/repo@<branch>. app simulator build ✓. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Correctness fix from the review backlog.
Bug
Opening a repo without an explicit ref (bare
owner/repo) stored the original nil ref in the manifest, so every refresh re-resolved to the repo's current default branch. If the owner later changed the default (main→develop), "Refresh from GitHub" silently pulled a different branch into the existing vault.Fix
The manifest is now pinned to the resolved branch name captured at the initial open, so refreshes always follow the branch you actually opened. The vault directory stays keyed by the original link (dedupe/open still resolve to the same folder); the only visible change is the slug now reads
owner/repo@<branch>— which is also more informative.resolveCommitalready returns the resolved branch name, so this is a one-spot change at manifest-write time.Verify
App simulator build ✓.
🤖 Generated with Claude Code