X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=builtin-checkout.c;h=b8a4b0139b3b9c2f731315413a73db30edaf9231;hb=bbc0995792880d9f87f5c1a871f5f55b7284c7f1;hp=f2d7ef01b0bbe667ae8042f7a806a634fa0aa46b;hpb=362724af6cf5edf35832ba0dbc7783806a38871e;p=~andy%2Fgit diff --git a/builtin-checkout.c b/builtin-checkout.c index f2d7ef01b..b8a4b0139 100644 --- a/builtin-checkout.c +++ b/builtin-checkout.c @@ -216,7 +216,7 @@ static int checkout_paths(struct tree *source_tree, const char **pathspec, 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) @@ -366,7 +366,7 @@ static int merge_working_tree(struct checkout_opts *opts, 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) {