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:
committed by
Junio C Hamano
parent
a7edadda59
commit
58bf2a4cc7
@ -40,7 +40,7 @@ static void hash_fd(int fd, const char *type, const char *path, unsigned flags,
|
||||
if (fstat(fd, &st) < 0 ||
|
||||
(literally
|
||||
? hash_literally(&oid, fd, type, flags)
|
||||
: index_fd(&oid, fd, &st, type_from_string(type), path, flags)))
|
||||
: index_fd(&the_index, &oid, fd, &st, type_from_string(type), path, flags)))
|
||||
die((flags & HASH_WRITE_OBJECT)
|
||||
? "Unable to add %s to database"
|
||||
: "Unable to hash %s", path);
|
||||
|
||||
Reference in New Issue
Block a user