Re: [PATCH v2 2/2] Handle more file writes correctly in shared repos
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jan 8, 2016, 16:04 UTC
- Message-ID
- <alpine.DEB.2.20.1601081702070.2964@virtualbox>
- In-Reply-To
- <20160107124608.GB14421@sigill.intra.peff.net>
Hi Peff,
On Thu, 7 Jan 2016, Jeff King wrote:
Show 13 quoted lines
> On Wed, Jan 06, 2016 at 02:09:49PM +0100, Johannes Schindelin wrote: > > > - git am, when splitting mails (git-am correctly cleans up its > > directory after finishing, so there is no need to share those files > > between users) > > > > - git apply, when writing rejected hunks > > > > - git fsck, when writing lost&found blobs > > For these latter two, I had to ask myself "why not?". You gave such nice > reasons for the other items in the list, I wondered what your reasoning > was here.
My bad. My reading on both rejected hunks and lost & found blobs is that the files should be cleaned up by the user who generated them. And if another user can interfere with that cleaning up, that is bad. So I left them non-shared to avoid such an interference.
> I also wondered why we do not do the usual write-to-temp and rename in > some of these cases, but that is not really relevant to your patch.
Oh yeah, I'd love to stop here (I already extended this rather simple one-line patch to something vastly larger, and that was not my intention).
Ciao, Dscho