summaryrefslogtreecommitdiff
path: root/remote-curl.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-12-22 11:27:22 -0800
committerJunio C Hamano <gitster@pobox.com>2011-12-22 11:27:22 -0800
commit200888ef3bbc150cc20b99e0aa039c751c00e07a (patch)
tree8b1421c5aafe507c8ca50b1b421c8f33cf084d9a /remote-curl.c
parente443bdfe1e8e1ef8b3665cfd1c1295bd73e13773 (diff)
parent02f7914734eb8360cf314d887931c5d5ad0d8046 (diff)
downloadgit-200888ef3bbc150cc20b99e0aa039c751c00e07a.tar.gz
Merge branch 'jk/http-push-to-empty'
* jk/http-push-to-empty: remote-curl: don't pass back fake refs Conflicts: remote-curl.c
Diffstat (limited to 'remote-curl.c')
-rw-r--r--remote-curl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/remote-curl.c b/remote-curl.c
index 6a352de7be..48c20b86f3 100644
--- a/remote-curl.c
+++ b/remote-curl.c
@@ -188,7 +188,7 @@ static int write_discovery(int in, int out, void *data)
return err;
}
-static struct ref *parse_git_refs(struct discovery *heads)
+static struct ref *parse_git_refs(struct discovery *heads, int for_push)
{
struct ref *list = NULL;
struct async async;
@@ -200,7 +200,8 @@ static struct ref *parse_git_refs(struct discovery *heads)
if (start_async(&async))
die("cannot start thread to parse advertised refs");
- get_remote_heads(async.out, &list, 0, NULL);
+ get_remote_heads(async.out, &list,
+ for_push ? REF_NORMAL : 0, NULL);
close(async.out);
if (finish_async(&async))
die("ref parsing thread failed");
@@ -268,7 +269,7 @@ static struct ref *get_refs(int for_push)
heads = discover_refs("git-upload-pack");
if (heads->proto_git)
- return parse_git_refs(heads);
+ return parse_git_refs(heads, for_push);
return parse_info_refs(heads);
}