aboutsummaryrefslogtreecommitdiffstats
path: root/odb
diff options
context:
space:
mode:
Diffstat (limited to 'odb')
-rw-r--r--odb/streaming.c10
-rw-r--r--odb/streaming.h7
2 files changed, 4 insertions, 13 deletions
diff --git a/odb/streaming.c b/odb/streaming.c
index 7ef58adaa2..745cd486fb 100644
--- a/odb/streaming.c
+++ b/odb/streaming.c
@@ -214,8 +214,6 @@ ssize_t odb_read_stream_read(struct odb_read_stream *st, void *buf, size_t sz)
struct odb_read_stream *odb_read_stream_open(struct object_database *odb,
const struct object_id *oid,
- enum object_type *type,
- unsigned long *size,
struct stream_filter *filter)
{
struct odb_read_stream *st;
@@ -235,8 +233,6 @@ struct odb_read_stream *odb_read_stream_open(struct object_database *odb,
st = nst;
}
- *size = st->size;
- *type = st->type;
return st;
}
@@ -247,18 +243,16 @@ int odb_stream_blob_to_fd(struct object_database *odb,
int can_seek)
{
struct odb_read_stream *st;
- enum object_type type;
- unsigned long sz;
ssize_t kept = 0;
int result = -1;
- st = odb_read_stream_open(odb, oid, &type, &sz, filter);
+ st = odb_read_stream_open(odb, oid, filter);
if (!st) {
if (filter)
free_stream_filter(filter);
return result;
}
- if (type != OBJ_BLOB)
+ if (st->type != OBJ_BLOB)
goto close_and_exit;
for (;;) {
char buf[1024 * 16];
diff --git a/odb/streaming.h b/odb/streaming.h
index 7cb55213b7..c7861f7e13 100644
--- a/odb/streaming.h
+++ b/odb/streaming.h
@@ -25,16 +25,13 @@ struct odb_read_stream {
};
/*
- * Create a new object stream for the given object database. Populates the type
- * and size pointers with the object's info. An optional filter can be used to
- * transform the object's content.
+ * Create a new object stream for the given object database. An optional filter
+ * can be used to transform the object's content.
*
* Returns the stream on success, a `NULL` pointer otherwise.
*/
struct odb_read_stream *odb_read_stream_open(struct object_database *odb,
const struct object_id *oid,
- enum object_type *type,
- unsigned long *size,
struct stream_filter *filter);
/*