fix(update): fetch --tags --force so moved upstream tags don't fail the fetch - #15
Merged
Merged
Conversation
…he fetch
git fetch --tags origin rejected every tag whose local object differed
from the remote one ('would clobber existing tag'), failing the whole
fetch even though branch refs updated fine - a stale local tag mirror
poisoned every update of the module. Local tags in a plugin submodule
are mirrors of upstream, never local creations, so --force refreshes
them (same trust level as the pull itself).
Regression test in tests/update.vader: a local annotated tag with a
different tag-object SHA than the remote must not surface as Fetch
failed, and the mirror must be refreshed to the remote object.
Diagnosed on a real setup (12 stale tag mirrors on the
vim-plugin-manager submodule of the maintainer's vim config).
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.
Summary
git fetch --tags originrejected every tag whose local object differed from the remote one ("would clobber existing tag"), failing the whole fetch even though branch refs updated fine - a stale local tag mirror marked the module "Fetch failed" on every update (diagnosed live: 12 stale v1.x/v2.1.x mirrors on the maintainer's vim-plugin-manager submodule). Local tags in a plugin submodule are mirrors of upstream, never local creations, so--forcerefreshes them - same trust level as the pull itself.Type of change
Related issue
n/a (diagnosed on the maintainer's setup from a user-reported "Fetch failed"; no issue tracking it)
How was this tested?
Vim 9.1 (Debian). TDD: the regression test (tests/update.vader - local annotated tag with a different tag-object SHA must not surface as Fetch failed and must be refreshed to the remote object) was written RED against main, then GREEN with the one-token fix. check/status fetches stay
-q originwithout --tags (no tags needed there).make test-cipasses (217/217)make test-asyncpasses (16/16)make test-install-smokepasses (install/declare changes)(bug fixes: failing regression test before the fix)
Checklist
type(scope): subject)g:plugin_manager_*flag defaulting to off)v:version < 802untouched)