summaryrefslogtreecommitdiff
path: root/send-pack.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2013-12-05 20:02:29 +0700
committerJunio C Hamano <gitster@pobox.com>2013-12-10 16:14:15 -0800
commit13eb4626c43b3116bb431671d593565eadc36852 (patch)
tree01f7f161d5eedaaf3498eef791cbefbcf6234f68 /send-pack.c
parent75f8cbab2a2ddc50728ade82baad223ed54bb040 (diff)
downloadgit-13eb4626c43b3116bb431671d593565eadc36852.tar.gz
remote.h: replace struct extra_have_objects with struct sha1_array
The latter can do everything the former can and is used in many more places. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'send-pack.c')
-rw-r--r--send-pack.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/send-pack.c b/send-pack.c
index fab62e3da0..14005faefc 100644
--- a/send-pack.c
+++ b/send-pack.c
@@ -10,6 +10,7 @@
#include "quote.h"
#include "transport.h"
#include "version.h"
+#include "sha1-array.h"
static int feed_object(const unsigned char *sha1, int fd, int negative)
{
@@ -28,7 +29,7 @@ static int feed_object(const unsigned char *sha1, int fd, int negative)
/*
* Make a pack stream and spit it out into file descriptor fd
*/
-static int pack_objects(int fd, struct ref *refs, struct extra_have_objects *extra, struct send_pack_args *args)
+static int pack_objects(int fd, struct ref *refs, struct sha1_array *extra, struct send_pack_args *args)
{
/*
* The child becomes pack-objects --revs; we feed
@@ -71,7 +72,7 @@ static int pack_objects(int fd, struct ref *refs, struct extra_have_objects *ext
* parameters by writing to the pipe.
*/
for (i = 0; i < extra->nr; i++)
- if (!feed_object(extra->array[i], po.in, 1))
+ if (!feed_object(extra->sha1[i], po.in, 1))
break;
while (refs) {
@@ -177,7 +178,7 @@ static int sideband_demux(int in, int out, void *data)
int send_pack(struct send_pack_args *args,
int fd[], struct child_process *conn,
struct ref *remote_refs,
- struct extra_have_objects *extra_have)
+ struct sha1_array *extra_have)
{
int in = fd[0];
int out = fd[1];