1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-24 20:06:11 +02:00

sha1_file: convert index_stream to struct object_id

Signed-off-by: Patryk Obara <patryk.obara@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Patryk Obara 2017-08-20 22:09:31 +02:00 committed by Junio C Hamano
parent da77611d73
commit 7d5e1dc333

View File

@ -3655,11 +3655,11 @@ static int index_core(unsigned char *sha1, 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(unsigned char *sha1, int fd, size_t size,
static int index_stream(struct object_id *oid, int fd, size_t size,
enum object_type type, const char *path,
unsigned flags)
{
return index_bulk_checkin(sha1, fd, size, type, path, flags);
return index_bulk_checkin(oid->hash, fd, size, type, path, flags);
}
int index_fd(struct object_id *oid, int fd, struct stat *st,
@ -3680,7 +3680,7 @@ int index_fd(struct object_id *oid, int fd, struct stat *st,
ret = index_core(oid->hash, fd, xsize_t(st->st_size), type, path,
flags);
else
ret = index_stream(oid->hash, fd, xsize_t(st->st_size), type, path,
ret = index_stream(oid, fd, xsize_t(st->st_size), type, path,
flags);
close(fd);
return ret;