summaryrefslogtreecommitdiff
path: root/src/fetch.c
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlos@cmartin.tk>2012-05-09 16:18:13 +0200
committerCarlos Martín Nieto <carlos@cmartin.tk>2012-05-09 16:18:13 +0200
commit11678b37183f3b13ad3b9eb4e4916a036d7a97d8 (patch)
tree1ed41ffd7e0e0d6daeeb6eeb21a9444127724e65 /src/fetch.c
parent0536afcaa9c27105b184d2fccac1a7b9e778f27c (diff)
downloadlibgit2-11678b37183f3b13ad3b9eb4e4916a036d7a97d8.tar.gz
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.
Diffstat (limited to 'src/fetch.c')
-rw-r--r--src/fetch.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/fetch.c b/src/fetch.c
index 1944bd005..08c789ddb 100644
--- a/src/fetch.c
+++ b/src/fetch.c
@@ -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 (!git_refspec_src_matches(p->spec, head->name))
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 */