Skip to content

Commit 22539ec

Browse files
matheustavaresdscho
authored andcommitted
unpack_trees(): start with a fresh lstat cache
We really want to avoid relying on stale information. Signed-off-by: Matheus Tavares <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 0d58fef commit 22539ec

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

unpack-trees.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,9 @@ static int check_updates(struct unpack_trees_options *o)
349349

350350
progress = get_progress(o);
351351

352+
/* Start with clean cache to avoid using any possibly outdated info. */
353+
invalidate_lstat_cache();
354+
352355
if (o->update)
353356
git_attr_set_direction(GIT_ATTR_CHECKOUT, index);
354357

0 commit comments

Comments
 (0)