diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2021-02-12 17:47:42 +0300 |
---|---|---|
committer | Johannes Schindelin <johannes.schindelin@gmx.de> | 2021-02-12 17:47:42 +0300 |
commit | 9b77cec89b64f0910df911952ccee0cdf0046f48 (patch) | |
tree | 7862bb9a330acb1c2ab3f6273d8b659249d3a253 /run-command.c | |
parent | ba6f0905fdb9e65c1ac5fbc79c9a4ef0b59b3e68 (diff) | |
parent | 6b82d3eea625d83af067dc0ed57e361711cfb8b7 (diff) |
Sync with 2.17.6
* maint-2.17:
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.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/run-command.c b/run-command.c index 84b883c213..af8f1dfc07 100644 --- a/run-command.c +++ b/run-command.c @@ -950,6 +950,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; } @@ -1236,13 +1237,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 } |