Commit 27008e849f510622ac880bb818f0e928a9d1bdf6

Jason Haslam 2016-06-14T14:46:12

fetch: Fixed spurious update callback for existing tags.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/src/remote.c b/src/remote.c
index 8b7203e..db7564a 100644
--- a/src/remote.c
+++ b/src/remote.c
@@ -1414,7 +1414,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);