]> git.ipfire.org Git - thirdparty/git.git/blobdiff - run-command.c
Merge branch 'cm/rebase-i-updates'
[thirdparty/git.git] / run-command.c
index 509841bf273d821df41c0f0aef86d5768dda9e0b..be6bc128cd9df2f61211cb7b8f9552b2d745cc0a 100644 (file)
@@ -993,6 +993,7 @@ int finish_command(struct child_process *cmd)
        int ret = wait_or_whine(cmd->pid, cmd->argv[0], 0);
        trace2_child_exit(cmd, ret);
        child_process_clear(cmd);
+       invalidate_lstat_cache();
        return ret;
 }
 
@@ -1294,13 +1295,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
 }
 
@@ -1631,8 +1638,8 @@ static void pp_init(struct parallel_processes *pp,
        pp->nr_processes = 0;
        pp->output_owner = 0;
        pp->shutdown = 0;
-       pp->children = xcalloc(n, sizeof(*pp->children));
-       pp->pfd = xcalloc(n, sizeof(*pp->pfd));
+       CALLOC_ARRAY(pp->children, n);
+       CALLOC_ARRAY(pp->pfd, n);
        strbuf_init(&pp->buffered_output, 0);
 
        for (i = 0; i < n; i++) {