cache.h: flip NO_THE_INDEX_COMPATIBILITY_MACROS switch

By default, index compat macros are off from now on, because they
could hide the_index dependency.

Only those in builtin can use it.

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
2019-01-24 15:29:12 +07:00
committed by Junio C Hamano
parent 150fe065f7
commit f8adbec9fe
55 changed files with 58 additions and 24 deletions

View File

@ -40,7 +40,8 @@ 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(&the_index, &oid, fd, &st, type_from_string(type), path, flags)))
: index_fd(the_repository->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);