Skip to content

Commit af61b11

Browse files
author
Git for Windows Build Agent
committed
Merge pull request #1427 from atetubou/reset_fscache
reset.c: enable fscache
2 parents 4483849 + e805a26 commit af61b11

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

builtin/reset.c

+6-1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ static int reset_index(const struct object_id *oid, int reset_type, int quiet)
5252
struct tree *tree;
5353
struct unpack_trees_options opts;
5454
int ret = -1;
55+
int unpack_result;
5556

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

94-
if (unpack_trees(nr, desc, &opts))
95+
enable_fscache(1);
96+
unpack_result = unpack_trees(nr, desc, &opts);
97+
enable_fscache(0);
98+
99+
if (unpack_result)
95100
goto out;
96101

97102
if (reset_type == MIXED || reset_type == HARD) {

0 commit comments

Comments
 (0)