Commit abb6f72aaacd4edb4131d1bdb8d0965bd189ee82

Edward Thomson 2016-06-14T11:42:00

Merge pull request #3812 from stinb/fetch-tag-update-callback 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);