summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Haslam <jason@scitools.com>2016-06-14 14:46:12 -0600
committerJason Haslam <jason@scitools.com>2016-06-14 14:46:12 -0600
commit7f9673e4151bdfcb7d9ace8438332b934f57a710 (patch)
treeb66e62ce23204b0a282859b2ac22f6dc4dee86de
parentf0ee795ccb552b87637c7973ac64f64437baa041 (diff)
downloadlibgit2-7f9673e4151bdfcb7d9ace8438332b934f57a710.tar.gz
fetch: Fixed spurious update callback for existing tags.
-rw-r--r--src/remote.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/remote.c b/src/remote.c
index 5ff7f6826..a408acb3e 100644
--- a/src/remote.c
+++ b/src/remote.c
@@ -1423,7 +1423,11 @@ static int update_tips_for_spec(
/* In autotag mode, don't overwrite any locally-existing tags */
error = git_reference_create(&ref, remote->repo, refname.ptr, &head->oid, !autotag,
log_message);
- if (error < 0 && error != GIT_EEXISTS)
+
+ if (error == GIT_EEXISTS)
+ continue;
+
+ if (error < 0)
goto on_error;
git_reference_free(ref);