Subject: Re: [PATCH] builtin/clean.c: Handle disappearing files

From: David Turner <[email-masked]>
Date: Fri, 15 May 2015 14:13:32 -0400

On Thu, 2015-05-14 at 22:26 -0700, Junio C Hamano wrote:
<snip>

OK, I'm sold that this patch is not a great idea. But:

> If your "build statistics" thing
> created a temporary before "clean" started to run (causing 'clean'
> to notice that as a cruft), and if "clean" gets to remove it before
> the "build statistics" thing finishes what it was doing accumulating
> whatever data in that file, when "build statistics" thing finally
> tries to use the file, it no longer is there.

Only if the build statistics file is included in the pathspec for
clean.  

So maybe we should just move the lstat below the pathspec check.  This
is probably faster in some cases anyway.  What do you think?