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>

Patryk Obara committed Aug 20, 2017 at 22:09 UTC 7d5e1dc333e9dc2493405c7c6d74f0c0d8b93455
1 file changed +3 -3
sha1_file.c
+3 -3
@@ -3655,11 +3655,11 @@ static int index_core(unsigned char *sha1, int fd, size_t size,
3655 * binary blobs, they generally do not want to get any conversion, and
3656 * callers should avoid this code path when filters are requested.
3657 */
3658 -static int index_stream(unsigned char *sha1, int fd, size_t size,
3658 +static int index_stream(struct object_id *oid, int fd, size_t size,
3659 enum object_type type, const char *path,
3660 unsigned flags)
3661 {
3662 - return index_bulk_checkin(sha1, fd, size, type, path, flags);
3662 + return index_bulk_checkin(oid->hash, fd, size, type, path, flags);
3663 }
3664
3665 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,
3680 ret = index_core(oid->hash, fd, xsize_t(st->st_size), type, path,
3681 flags);
3682 else
3683 - ret = index_stream(oid->hash, fd, xsize_t(st->st_size), type, path,
3683 + ret = index_stream(oid, fd, xsize_t(st->st_size), type, path,
3684 flags);
3685 close(fd);
3686 return ret;