]> git.ipfire.org Git - thirdparty/git.git/commitdiff
unpack_trees(): start with a fresh lstat cache
authorMatheus Tavares <matheus.bernardino@usp.br>
Tue, 2 Feb 2021 21:37:10 +0000 (22:37 +0100)
committerJohannes Schindelin <johannes.schindelin@gmx.de>
Fri, 12 Feb 2021 14:47:02 +0000 (15:47 +0100)
We really want to avoid relying on stale information.

Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
unpack-trees.c

index 88a0b5d250ef1da36747fe0b736df4305979977d..5914e7b8ccda0750f30ebe28ec901afaa6c023dc 100644 (file)
@@ -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);