Commit 11678b37 by Carlos Martín Nieto

fetch: filter tag annotation pseudo-refs while generating wants

These objects aren't considered as being advertised, so asking for
them will cause the remote end to close the connection. This makes the
checking in update_tips() unnecessary, because they don't get inserted
in the list.
parent 0536afca
...@@ -36,6 +36,10 @@ static int filter_ref__cb(git_remote_head *head, void *payload) ...@@ -36,6 +36,10 @@ static int filter_ref__cb(git_remote_head *head, void *payload)
/* If it doesn't match the refpec, we don't want it */ /* If it doesn't match the refpec, we don't want it */
if (!git_refspec_src_matches(p->spec, head->name)) if (!git_refspec_src_matches(p->spec, head->name))
return 0; return 0;
/* Don't even try to ask for the annotation target */
if (!git__suffixcmp(head->name, "^{}"))
return 0;
} }
/* If we have the object, mark it so we don't ask for it */ /* If we have the object, mark it so we don't ask for it */
......
...@@ -353,10 +353,6 @@ int git_remote_update_tips(git_remote *remote, int (*cb)(const char *refname, co ...@@ -353,10 +353,6 @@ int git_remote_update_tips(git_remote *remote, int (*cb)(const char *refname, co
for (; i < refs->length; ++i) { for (; i < refs->length; ++i) {
head = refs->contents[i]; head = refs->contents[i];
/* Skip tag annotations */
if (!git__suffixcmp(head->name, "^{}"))
continue;
if (git_refspec_transform_r(&refname, spec, head->name) < 0) if (git_refspec_transform_r(&refname, spec, head->name) < 0)
goto on_error; goto on_error;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment