Fix tests TestFetchOfMissingObjects and TestFetchWildcardTags #1459
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.
TestFetchWildcardTags
When comparing the expected behaviour versus upstream git cli, it became clear that the tests expected all tags to be pulled - without actually setting that. This is a change in behaviour which will be introduced in v6, whereby Fetch is not expected to return all tags by default.
The git commands used for testing were:
Based on the above, the test was amended to actively request for all tags to be returned.
This change has been tagged as breaking to reflect the previously made change that required it.
TestFetchOfMissingObjects
The test was failing due to a recently introduced optimisation, which skipped getting a commit if the reference was already known. The challenge with this approach is that it removes go-git's ability to self-heal when the underlying objects are no longer available.