rev-list: let traversal die when --missing is not in use
[gitweb.git] / builtin / hash-object.c
index d6f06ea32f51272efa5ccb3fdd396b5916e98e45..e055c1110310bc3b6ccef4fa83dae84316fcc75f 100644 (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);