@@ -96,7 +96,7 @@ static int already_written(struct bulk_checkin_state *state, struct object_id *o
*/
static int stream_to_pack(struct bulk_checkin_state *state,
git_hash_ctx *ctx, off_t *already_hashed_to,
- int fd, size_t size, enum object_type type,
+ int fd, off_t size, enum object_type type,
const char *path, unsigned flags)
{
git_zstream s;
@@ -189,7 +189,7 @@ static void prepare_to_stream(struct bulk_checkin_state *state,
static int deflate_to_pack(struct bulk_checkin_state *state,
struct object_id *result_oid,
- int fd, size_t size,
+ int fd, off_t size,
enum object_type type, const char *path,
unsigned flags)
{
@@ -258,7 +258,7 @@ static int deflate_to_pack(struct bulk_checkin_state *state,
}
int index_bulk_checkin(struct object_id *oid,
- int fd, size_t size, enum object_type type,
+ int fd, off_t size, enum object_type type,
const char *path, unsigned flags)
{
int status = deflate_to_pack(&state, oid, fd, size, type,
@@ -7,7 +7,7 @@
#include "cache.h"
extern int index_bulk_checkin(struct object_id *oid,
- int fd, size_t size, enum object_type type,
+ int fd, off_t size, enum object_type type,
const char *path, unsigned flags);
extern void plug_bulk_checkin(void);
@@ -1934,7 +1934,7 @@ static int index_core(struct object_id *oid, int fd, size_t size,
* binary blobs, they generally do not want to get any conversion, and
* callers should avoid this code path when filters are requested.
*/
-static int index_stream(struct object_id *oid, int fd, size_t size,
+static int index_stream(struct object_id *oid, int fd, off_t size,
enum object_type type, const char *path,
unsigned flags)
{
@@ -1959,8 +1959,7 @@ int index_fd(struct object_id *oid, int fd, struct stat *st,
ret = index_core(oid, fd, xsize_t(st->st_size), type, path,
flags);
else
- ret = index_stream(oid, fd, xsize_t(st->st_size), type, path,
- flags);
+ ret = index_stream(oid, fd, st->st_size, type, path, flags);
close(fd);
return ret;
}