Skip to content

fix(update): fetch --tags --force so moved upstream tags don't fail the fetch - #15

Merged
log0u7 merged 1 commit into
mainfrom
fix/fetch-tags-force
Sep 21, 2026
Merged

log0u7 merged 1 commit into
mainfrom
fix/fetch-tags-force

Conversation

@log0u7

@log0u7 log0u7 commented Sep 21, 2026

Copy link
Copy Markdown
Owner

Summary

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 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 --force refreshes them - same trust level as the pull itself.

Type of change

  • feat (new feature)
  • fix (bug fix)
  • docs
  • test
  • refactor
  • chore / ci

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 origin without --tags (no tags needed there).

  • make test-ci passes (217/217)
  • make test-async passes (16/16)
  • make test-install-smoke passes (install/declare changes)
  • Verified manually on Vim 8.2+ / Linux
  • New logic covered by a Vader test, written test-first when possible
    (bug fixes: failing regression test before the fix)

Checklist

  • Commits follow Conventional Commits (type(scope): subject)
  • README.md / doc/plugin_manager.txt / CHANGELOG.md updated if behavior changed
  • No new network call at startup (opt-in only, behind a g:plugin_manager_* flag defaulting to off)
  • Linux only, Vim 8.2 floor respected (no Vim 9+ features, guard v:version < 802 untouched)

…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).
@log0u7
log0u7 merged commit e3c5275 into main Sep 21, 2026
32 checks passed
@log0u7
log0u7 deleted the fix/fetch-tags-force branch September 21, 2026 20:12
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.

1 participant