Skip to content

Commit 8d6f67c

Browse files
authored
Merge pull request #1419 from atetubou/enable_fscache
checkout.c: enable fscache for checkout_entry
2 parents acc24d3 + 5ee8200 commit 8d6f67c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

builtin/checkout.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include "resolve-undo.h"
2222
#include "submodule-config.h"
2323
#include "submodule.h"
24+
#include "fscache.h"
2425

2526
static const char * const checkout_usage[] = {
2627
N_("git checkout [<options>] <branch>"),
@@ -360,6 +361,7 @@ static int checkout_paths(const struct checkout_opts *opts,
360361
state.istate = &the_index;
361362

362363
enable_delayed_checkout(&state);
364+
enable_fscache(1);
363365
for (pos = 0; pos < active_nr; pos++) {
364366
struct cache_entry *ce = active_cache[pos];
365367
if (ce->ce_flags & CE_MATCHED) {
@@ -374,6 +376,7 @@ static int checkout_paths(const struct checkout_opts *opts,
374376
pos = skip_same_name(ce, pos) - 1;
375377
}
376378
}
379+
enable_fscache(0);
377380
errs |= finish_delayed_checkout(&state);
378381

379382
if (write_locked_index(&the_index, lock_file, COMMIT_LOCK))

0 commit comments

Comments
 (0)