Repository navigation
sync-skill: fetch upstream main by explicit refspec - #132
Merged
Merged
Conversation
…/main is never stale The clone's remote.upstream.fetch maps only refs/heads/FixDeleteWorktree*, so Step 1's 'git fetch upstream main' wrote FETCH_HEAD and left upstream/main at bfc436b while upstream's real tip was fd8b2dc (v1.4.237 run). Every --not upstream/main count and the Step 12 mirror push read the stale ref.
|
Your organization has run out of review credits. Add credits to resume code reviews. |
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.
ELI5
The sync skill's first fetch didn't actually update
upstream/mainin this clone, so the run worked from an old copy of upstream's trunk without noticing. This changes Step 1 to fetch by explicit refspec, which always updates the ref.What Changed
Step 1 of
.claude/skills/sync-upstream/SKILL.mdnow fetchesupstream/main,origin/mainandorigin/upstreamby explicit refspec, and says why the bare form fails.Why
This clone's
remote.upstream.fetchis narrowed:On the v1.4.237 run (#131), after
git fetch upstream main,upstream/mainwas still atbfc436be60while upstream's tip wasfd8b2dc3a7. Steps 2 and 7 excludeupstream/mainwhen counting fork commits, and Step 12 fast-forwards the mirror branch from it, so all three read the stale ref. The run caught it and re-fetched withrefs/heads/main:refs/remotes/upstream/main. The fork commit count (726) was unaffected that time.Linked Issue
N/A. Sync-skill lesson from the v1.4.237 run.
Visual Proof
N/A. Docs only.
Testing
Ran both new fetch commands in this clone; each updates its remote-tracking ref.
Docs-only change to a skill file; no tests apply.