From: Matheus Tavares Date: Tue, 2 Feb 2021 21:37:10 +0000 (+0100) Subject: unpack_trees(): start with a fresh lstat cache X-Git-Tag: v2.17.6~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=22539ec3b5e678c054ab361a37a7cdcc64ca1228;p=thirdparty%2Fgit.git unpack_trees(): start with a fresh lstat cache We really want to avoid relying on stale information. Signed-off-by: Matheus Tavares Signed-off-by: Johannes Schindelin --- diff --git a/unpack-trees.c b/unpack-trees.c index 88a0b5d250..5914e7b8cc 100644 --- a/unpack-trees.c +++ b/unpack-trees.c @@ -349,6 +349,9 @@ static int check_updates(struct unpack_trees_options *o) progress = get_progress(o); + /* Start with clean cache to avoid using any possibly outdated info. */ + invalidate_lstat_cache(); + if (o->update) git_attr_set_direction(GIT_ATTR_CHECKOUT, index);