Commit 7f9673e4151bdfcb7d9ace8438332b934f57a710

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 5ff7f68..a408acb 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);