diff --git a/builtin-checkout.c b/builtin-checkout.c
index f2d7ef01b0bbe667ae8042f7a806a634fa0aa46b..b8a4b0139b3b9c2f731315413a73db30edaf9231 100644 (file)
--- a/builtin-checkout.c
+++ b/builtin-checkout.c
struct lock_file *lock_file = xcalloc(1, sizeof(struct lock_file));
newfd = hold_locked_index(lock_file, 1);
- if (read_cache() < 0)
+ if (read_cache_preload(pathspec) < 0)
return error("corrupt index file");
if (source_tree)
struct lock_file *lock_file = xcalloc(1, sizeof(struct lock_file));
int newfd = hold_locked_index(lock_file, 1);
- if (read_cache() < 0)
+ if (read_cache_preload(NULL) < 0)
return error("corrupt index file");
if (opts->force) {