FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fetch: Fixed spurious update callback for existing tags. by hackhaslam · Pull Request #3812 · libgit2/libgit2 · GitHub

Repository navigation

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

Merged
ethomson merged 1 commit into
libgit2:masterfrom
stinb:fetch-tag-update-callback
Jun 14, 2016
Merged

ethomson merged 1 commit into
libgit2:masterfrom
stinb:fetch-tag-update-callback

Conversation

Copy link
Copy Markdown
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.

Copy link
Copy Markdown
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 force-pushed the fetch-tag-update-callback branch from c0e2e7c to 7f9673e Compare June 14, 2016 20:46

Copy link
Copy Markdown
Contributor Author

Yeah, that makes sense. Updated accordingly.

Copy link
Copy Markdown
Contributor Author

And thanks for the review!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL