-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
fix(scoop-update): Force sync tags w/ remote branch while scoop update #6439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Should we implement similar changes to bucket updates? |
A bucket should not have |
I mean something like hard reset when conflicting. |
Stash? If someone made their own change. |
WalkthroughThe update adjusts scoop-update to run git pull with --tags and --force when no repo/branch change is detected, ensuring tag synchronization. A corresponding Unreleased Bug Fix entry is added to CHANGELOG.md referencing this behavior. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant U as User
participant S as scoop-update.ps1
participant G as Git Remote
U->>S: Run scoop update
S->>S: Detect repo/branch change?
alt Repo/branch changed
S->>G: git fetch/pull (existing logic)
G-->>S: Updated refs
else No change detected
rect rgba(180,220,255,0.25)
note over S,G: Changed behavior: force-sync tags
S->>G: git pull -q --tags --force
end
G-->>S: Tags and refs synced
end
S-->>U: Update complete or error
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal). Please share your feedback with us on this Discord post. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
I'll check for #6454 soon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
CHANGELOG.md (1)
9-9
: Link to PR, not issue, per project conventionChange the link target to the PR instead of the issue to match Scoop’s CHANGELOG convention.
Apply this diff:
- - **scoop-update**: Force sync tags w/ remote branch while scoop update ([#6439](https://github.com/ScoopInstaller/Scoop/issues/6439)) + - **scoop-update**: Force sync tags w/ remote branch while scoop update ([#6439](https://github.com/ScoopInstaller/Scoop/pull/6439))Based on learnings
libexec/scoop-update.ps1 (1)
139-139
: Good fix; also prune tags to fully align with remoteFetching with
--tags --force
addresses retagging. Consider adding--prune-tags
so locally-deleted/renamed tags are cleaned up too.Apply this diff:
- Invoke-Git -Path $currentdir -ArgumentList @('pull', '--tags', '--force', '-q') + Invoke-Git -Path $currentdir -ArgumentList @('pull', '--tags', '--prune-tags', '--force', '-q')
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
CHANGELOG.md
(1 hunks)libexec/scoop-update.ps1
(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: z-Fng
PR: ScoopInstaller/Scoop#6471
File: CHANGELOG.md:9-9
Timestamp: 2025-08-31T01:48:00.222Z
Learning: The Scoop project's CHANGELOG.md follows a convention of tracking PR numbers only, not issue numbers, according to the maintainer z-Fng.
Description
Force sync tags while running
scoop update
to update Scoop Core.Motivation and Context
How Has This Been Tested?
Checklist:
develop
branch.Summary by CodeRabbit
Bug Fixes
Documentation