From: Johannes Schindelin Date: Fri, 12 Feb 2021 14:49:17 +0000 (+0100) Subject: Sync with 2.19.6 X-Git-Tag: v2.20.5~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=804963848e325ff6f4213e53aeda6ef831574e48;p=thirdparty%2Fgit.git Sync with 2.19.6 * maint-2.19: Git 2.19.6 Git 2.18.5 Git 2.17.6 unpack_trees(): start with a fresh lstat cache run-command: invalidate lstat cache after a command finished checkout: fix bug that makes checkout follow symlinks in leading path --- 804963848e325ff6f4213e53aeda6ef831574e48 diff --cc git-compat-util.h index d17360e897,523676d6fd..a6ad745974 --- a/git-compat-util.h +++ b/git-compat-util.h @@@ -345,14 -342,11 +345,19 @@@ typedef uintmax_t timestamp_t #define _PATH_DEFPATH "/usr/local/bin:/usr/bin:/bin" #endif +#ifndef platform_core_config +static inline int noop_core_config(const char *var, const char *value, void *cb) +{ + return 0; +} +#define platform_core_config noop_core_config +#endif + + int lstat_cache_aware_rmdir(const char *path); + #if !defined(__MINGW32__) && !defined(_MSC_VER) + #define rmdir lstat_cache_aware_rmdir + #endif + #ifndef has_dos_drive_prefix static inline int git_has_dos_drive_prefix(const char *path) { diff --cc unpack-trees.c index 545d5668fd,7e023daca3..dfea110b42 --- a/unpack-trees.c +++ b/unpack-trees.c @@@ -391,11 -350,11 +391,14 @@@ static int check_updates(struct unpack_ state.refresh_cache = 1; state.istate = index; + if (o->clone) + setup_collided_checkout_detection(&state, index); + 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);