diff options
author | Jeff King <peff@peff.net> | 2013-02-20 15:06:45 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-02-24 00:17:38 -0800 |
commit | 85edf4f58b5368e2f2acc4bce0d10e1ca9d6c879 (patch) | |
tree | 8aebba6d7b9df301e6e9144eaf98ebda021424be /transport.c | |
parent | 4981fe750b1fc58bfdf5b9ca9843f4f505b9bb4d (diff) | |
download | git-85edf4f58b5368e2f2acc4bce0d10e1ca9d6c879.tar.gz |
teach get_remote_heads to read from a memory buffer
Now that we can read packet data from memory as easily as a
descriptor, get_remote_heads can take either one as a
source. This will allow further refactoring in remote-curl.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'transport.c')
-rw-r--r-- | transport.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/transport.c b/transport.c index 886ffd8b1e..62df466c1a 100644 --- a/transport.c +++ b/transport.c @@ -507,7 +507,7 @@ static struct ref *get_refs_via_connect(struct transport *transport, int for_pus struct ref *refs; connect_setup(transport, for_push, 0); - get_remote_heads(data->fd[0], &refs, + get_remote_heads(data->fd[0], NULL, 0, &refs, for_push ? REF_NORMAL : 0, &data->extra_have); data->got_remote_heads = 1; @@ -541,7 +541,7 @@ static int fetch_refs_via_pack(struct transport *transport, if (!data->got_remote_heads) { connect_setup(transport, 0, 0); - get_remote_heads(data->fd[0], &refs_tmp, 0, NULL); + get_remote_heads(data->fd[0], NULL, 0, &refs_tmp, 0, NULL); data->got_remote_heads = 1; } @@ -799,7 +799,7 @@ static int git_transport_push(struct transport *transport, struct ref *remote_re struct ref *tmp_refs; connect_setup(transport, 1, 0); - get_remote_heads(data->fd[0], &tmp_refs, REF_NORMAL, NULL); + get_remote_heads(data->fd[0], NULL, 0, &tmp_refs, REF_NORMAL, NULL); data->got_remote_heads = 1; } |