sha1-file.c: remove implicit dependency on the_index

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Nguyễn Thái Ngọc Duy
2018-09-21 17:57:31 +02:00
committed by Junio C Hamano
parent a7edadda59
commit 58bf2a4cc7
9 changed files with 61 additions and 48 deletions

View File

@ -295,7 +295,7 @@ static int import_object(struct object_id *oid, enum object_type type,
close(fd);
return -1;
}
if (index_fd(oid, fd, &st, type, NULL, flags) < 0)
if (index_fd(&the_index, oid, fd, &st, type, NULL, flags) < 0)
return error(_("unable to write object to database"));
/* index_fd close()s fd for us */
}