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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2015-05-14 at 14:45 -0700, Junio C Hamano wrote:
> David Turner <dturner@xxxxxxxxxxxxxxxx> writes:
> 
> > During a git clean, some other process might be deleting files as
> > well.  If this happens, make git clean no longer die.
> >
> > Signed-off-by: David Turner <dturner@xxxxxxxxxxx>
> > ---
> 
> I am having a hard time to convince myself that this is a good
> change.
> 
> For this change to be an improvement that matters, you must be
> allowing some other process mucking around with the files in your
> working tree when you run "git clean".  The original catches such
> situation as an anomaly that the user would want to be aware of (and
> investigate), but this patch essentially declares that having such a
> random process touching your working tree from sideways is a normal
> situation.  I do not think I am willing to make such a declaration
> myself; I'd rather want to know why other people are touching my
> working tree while I am working in it.

Our build tool[1] stores statistics in a hidden file in the working
tree.  After it runs, it daemonizes and uploads those stats, and then
deletes the stats file.  Because the upload might take some time, the
user might run git clean in the meantime.  (I think there might be some
other deletion that happens in the background too; I haven't really
investigated).

Of course, in interactive use, very little harm is done if clean dies
here: the user simply must notice that the clean has failed and retry
it.  But in non-interactive use, scripts could fail.

At least, I think that's what could be causing us to hit this error; I
haven't actually done any research to see if this is true.

[1] https://github.com/pantsbuild/pants

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]