aboutsummaryrefslogtreecommitdiffstats
path: root/archive-tar.c
diff options
context:
space:
mode:
Diffstat (limited to 'archive-tar.c')
-rw-r--r--archive-tar.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/archive-tar.c b/archive-tar.c
index 73b63ddc41..0fc70d13a8 100644
--- a/archive-tar.c
+++ b/archive-tar.c
@@ -12,8 +12,8 @@
#include "tar.h"
#include "archive.h"
#include "odb.h"
+#include "odb/streaming.h"
#include "strbuf.h"
-#include "streaming.h"
#include "run-command.h"
#include "write-or-die.h"
@@ -129,22 +129,20 @@ static void write_trailer(void)
*/
static int stream_blocked(struct repository *r, const struct object_id *oid)
{
- struct git_istream *st;
- enum object_type type;
- unsigned long sz;
+ struct odb_read_stream *st;
char buf[BLOCKSIZE];
ssize_t readlen;
- st = open_istream(r, oid, &type, &sz, NULL);
+ st = odb_read_stream_open(r->objects, oid, NULL);
if (!st)
return error(_("cannot stream blob %s"), oid_to_hex(oid));
for (;;) {
- readlen = read_istream(st, buf, sizeof(buf));
+ readlen = odb_read_stream_read(st, buf, sizeof(buf));
if (readlen <= 0)
break;
do_write_blocked(buf, readlen);
}
- close_istream(st);
+ odb_read_stream_close(st);
if (!readlen)
finish_record();
return readlen;