Skip to content
Permalink
Browse files

Merge pull request #1419 from atetubou/enable_fscache

checkout.c: enable fscache for checkout_entry
  • Loading branch information...
dscho committed Jan 3, 2018
2 parents acc24d3 + 5ee8200 commit 8d6f67c0d3a57fe2538e06b519212decdaa8a0d7
Showing with 3 additions and 0 deletions.
  1. +3 −0 builtin/checkout.c
@@ -21,6 +21,7 @@
#include "resolve-undo.h"
#include "submodule-config.h"
#include "submodule.h"
#include "fscache.h"

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

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

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

0 comments on commit 8d6f67c

Please sign in to comment.
You can’t perform that action at this time.