Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Merged
ethomson merged 1 commit intolibgit2:masterlibgit2/libgit2:masterfrom
stinb:fetch-tag-update-callbackstinb/libgit2:fetch-tag-update-callbackCopy head branch name to clipboard
Jun 14, 2016
Merged

fetch: Fixed spurious update callback for existing tags.#3812
ethomson merged 1 commit intolibgit2:masterlibgit2/libgit2:masterfrom
stinb:fetch-tag-update-callbackstinb/libgit2:fetch-tag-update-callbackCopy head branch name to clipboard

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.