Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fetch: Fixed spurious update callback for existing tags. #3812

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 14, 2016

Conversation

hackhaslam
Copy link
Contributor

When an existing tag is changed on the remote, the default (autotag) behavior is to not overwrite the local tag, but the update callback is still called as if the tag had been updated. This commit fixes that.

@ethomson
Copy link
Member

This is very minor: I wonder if it would be clearer to write this as if (error == GIT_EEXISTS) continue?

This may help us in the future if we want to add additional logic to do with the remote, as right now the conditional seems to be about whether to call the callbacks, but we really want to stop all processing if the ref already existed. If there's additional processing in the future then it may make it more clear.

Thanks again for tackling this - and apologies for the delay in reviewing.

@hackhaslam hackhaslam force-pushed the fetch-tag-update-callback branch from c0e2e7c to 7f9673e Compare June 14, 2016 20:46
@hackhaslam
Copy link
Contributor Author

Yeah, that makes sense. Updated accordingly.

@hackhaslam
Copy link
Contributor Author

And thanks for the review!

@ethomson ethomson merged commit abb6f72 into libgit2:master Jun 14, 2016
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.

2 participants