{{ message }}
Repository navigation
Conversation
Tag auto-following takes precedence over an explicit fetch refspec in AUTO mode. This ignores custom destinations and prevents forced tag updates. Apply auto-following only when the current refspec does not explicitly map the tag to a destination. This also avoids pre-filling the refname buffer before an exact refspec transform appends its destination. Cover exact and wildcard destinations, forced updates of an existing tag, and preservation of an existing tag during ordinary auto-following. Fixes: libgit2#7438 Assisted-by: Codex:GPT-6 Signed-off-by: Eduard Zateev <hackerowskiy@gmail.com>
This branch has not been deployed
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.

In AUTO tag mode,
refs/tags/hard_tag:refs/custom/tagsilently ignores the requested destination, and+refs/tags/*:refs/tags/*does not replace an existing tag. Tag auto-following currently runs before the explicit refspec mapping.Prefer a matching refspec with a destination before applying auto-following. This honors the destination and force flag and keeps the output buffer empty for exact refspec transforms.
Three regression tests fail before the fix and pass afterward: exact destination, wildcard destination, and forced update. A fourth checks that ordinary auto-following preserves an existing local tag.
Validation on Fedora AArch64: all 201 selected remote, local-fetch, fetch, and FETCH_HEAD tests pass.
Fixes #7438.