aboutsummaryrefslogtreecommitdiffstats
path: root/run-command.c
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2021-02-12 15:49:17 +0100
committerJohannes Schindelin <johannes.schindelin@gmx.de>2021-02-12 15:49:17 +0100
commit804963848e325ff6f4213e53aeda6ef831574e48 (patch)
tree4d823f1bca28046972ceb9ff3962639df9953b77 /run-command.c
parent041bc65923e13313ca1b77681c3b2950b5e0a163 (diff)
parent9fb2a1fb08330795955dcd5af74d2c64ba258d59 (diff)
downloadgit-804963848e325ff6f4213e53aeda6ef831574e48.tar.gz
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
Diffstat (limited to 'run-command.c')
-rw-r--r--run-command.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/run-command.c b/run-command.c
index 3db26b7b0e..d61638c3dd 100644
--- a/run-command.c
+++ b/run-command.c
@@ -965,6 +965,7 @@ int finish_command(struct child_process *cmd)
{
int ret = wait_or_whine(cmd->pid, cmd->argv[0], 0);
child_process_clear(cmd);
+ invalidate_lstat_cache();
return ret;
}
@@ -1251,13 +1252,19 @@ error:
int finish_async(struct async *async)
{
#ifdef NO_PTHREADS
- return wait_or_whine(async->pid, "child process", 0);
+ int ret = wait_or_whine(async->pid, "child process", 0);
+
+ invalidate_lstat_cache();
+
+ return ret;
#else
void *ret = (void *)(intptr_t)(-1);
if (pthread_join(async->tid, &ret))
error("pthread_join failed");
+ invalidate_lstat_cache();
return (int)(intptr_t)ret;
+
#endif
}