Skip to content

Conversation

@pjbgf
Copy link
Member

@pjbgf pjbgf commented Mar 13, 2025

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:

git clone --no-checkout --bare  https://github.com/git-fixtures/tags.git /tmp/tags
cd /tmp/tags
git fetch origin '+refs/heads/*:refs/remotes/origin/*'

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.

pjbgf added 2 commits March 13, 2025 13:28
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:
git clone --no-checkout --bare  https://github.com/git-fixtures/tags.git /tmp/tags
cd /tmp/tags
git fetch origin '+refs/heads/*:refs/remotes/origin/*'

Based on the above, the test was amended to actively request for all tags to
be returned.

Signed-off-by: Paulo Gomes <pjbgf@linux.com>
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.

This resulted on the optimisation being removed.

Signed-off-by: Paulo Gomes <pjbgf@linux.com>
@pjbgf pjbgf added the breaking label Mar 13, 2025
@pjbgf pjbgf added this to the v6.0.0 milestone Mar 13, 2025
@pjbgf pjbgf requested a review from aymanbagabas March 13, 2025 13:35
Copy link
Member

@aymanbagabas aymanbagabas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great finds!

@pjbgf pjbgf merged commit b405ee4 into go-git:v6-transport Mar 13, 2025
5 of 14 checks passed
@pjbgf pjbgf deleted the v6-transport-fix branch March 13, 2025 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants