Skip to content

Commit 7d5e1dc

Browse files
dreamergitster
authored andcommitted
sha1_file: convert index_stream to struct object_id
Signed-off-by: Patryk Obara <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent da77611 commit 7d5e1dc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sha1_file.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3655,11 +3655,11 @@ static int index_core(unsigned char *sha1, int fd, size_t size,
36553655
* binary blobs, they generally do not want to get any conversion, and
36563656
* callers should avoid this code path when filters are requested.
36573657
*/
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,
36593659
enum object_type type, const char *path,
36603660
unsigned flags)
36613661
{
3662-
return index_bulk_checkin(sha1, fd, size, type, path, flags);
3662+
return index_bulk_checkin(oid->hash, fd, size, type, path, flags);
36633663
}
36643664

36653665
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,
36803680
ret = index_core(oid->hash, fd, xsize_t(st->st_size), type, path,
36813681
flags);
36823682
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,
36843684
flags);
36853685
close(fd);
36863686
return ret;

0 commit comments

Comments
 (0)