Merge pull request #3812 from stinb/fetch-tag-update-callback

fetch: Fixed spurious update callback for existing tags.
This commit is contained in:
Edward Thomson 2016-06-14 11:42:00 -10:00 committed by GitHub
commit abb6f72aaa

View File

@ -1423,7 +1423,11 @@ static int update_tips_for_spec(
/* In autotag mode, don't overwrite any locally-existing tags */ /* In autotag mode, don't overwrite any locally-existing tags */
error = git_reference_create(&ref, remote->repo, refname.ptr, &head->oid, !autotag, error = git_reference_create(&ref, remote->repo, refname.ptr, &head->oid, !autotag,
log_message); log_message);
if (error < 0 && error != GIT_EEXISTS)
if (error == GIT_EEXISTS)
continue;
if (error < 0)
goto on_error; goto on_error;
git_reference_free(ref); git_reference_free(ref);