Skip to content

Commit

Permalink
Merge pull request #1427 from atetubou/reset_fscache
Browse files Browse the repository at this point in the history
reset.c: enable fscache
  • Loading branch information
dscho committed Jan 17, 2018
2 parents d0192a7 + ce7699f commit 4584fb7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion builtin/reset.c
Expand Up @@ -52,6 +52,7 @@ static int reset_index(const struct object_id *oid, int reset_type, int quiet)
struct tree *tree;
struct unpack_trees_options opts;
int ret = -1;
int unpack_result;

memset(&opts, 0, sizeof(opts));
opts.head_idx = 1;
Expand Down Expand Up @@ -91,7 +92,11 @@ static int reset_index(const struct object_id *oid, int reset_type, int quiet)
}
nr++;

if (unpack_trees(nr, desc, &opts))
enable_fscache(1);
unpack_result = unpack_trees(nr, desc, &opts);
enable_fscache(0);

if (unpack_result)
goto out;

if (reset_type == MIXED || reset_type == HARD) {
Expand Down

0 comments on commit 4584fb7

Please sign in to comment.