From: Junio C Hamano Date: Thu, 22 Dec 2011 19:27:22 +0000 (-0800) Subject: Merge branch 'jk/http-push-to-empty' X-Git-Tag: v1.7.9-rc0~32 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/200888ef3bbc150cc20b99e0aa039c751c00e07a?ds=inline;hp=-c Merge branch 'jk/http-push-to-empty' * jk/http-push-to-empty: remote-curl: don't pass back fake refs Conflicts: remote-curl.c --- 200888ef3bbc150cc20b99e0aa039c751c00e07a diff --combined remote-curl.c index 6a352de7be,b780ba5ca8..48c20b86f3 --- a/remote-curl.c +++ b/remote-curl.c @@@ -188,7 -188,7 +188,7 @@@ static int write_discovery(int in, int 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 +200,8 @@@ 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, 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 +269,7 @@@ static struct ref *get_refs(int for_pus 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); } @@@ -859,7 -860,7 +860,7 @@@ int main(int argc, const char **argv url = strbuf_detach(&buf, NULL); - http_init(remote, url); + http_init(remote, url, 0); do { if (strbuf_getline(&buf, stdin, '\n') == EOF) {