Re: [RFC/PATCH] read-cache: write all indexes with the same permissions

2018-11-17 Thread SZEDER Gábor
On Sat, Nov 17, 2018 at 07:52:30AM +0100, Christian Couder wrote: > On Fri, Nov 16, 2018 at 8:20 PM Duy Nguyen wrote: > > > > On Fri, Nov 16, 2018 at 8:07 PM SZEDER Gábor wrote: > > > > > With the default 20% threshold a new shared index is written rather > > > frequently with our usual small

Re: [RFC/PATCH] read-cache: write all indexes with the same permissions

2018-11-16 Thread Christian Couder
On Fri, Nov 16, 2018 at 8:20 PM Duy Nguyen wrote: > > On Fri, Nov 16, 2018 at 8:07 PM SZEDER Gábor wrote: > > > With the default 20% threshold a new shared index is written rather > > frequently with our usual small test-repos: > > Side note. Split index is definitely not meant for small repos.

Re: [RFC/PATCH] read-cache: write all indexes with the same permissions

2018-11-16 Thread Duy Nguyen
On Fri, Nov 16, 2018 at 8:07 PM SZEDER Gábor wrote: > > On Fri, Nov 16, 2018 at 06:41:43PM +0100, Christian Couder wrote: > > On Tue, Nov 13, 2018 at 6:34 PM Ævar Arnfjörð Bjarmason > > wrote: > > > > I'm asking whether the bug in this patch isn't revealing an existing > > > issue with us not

Re: [RFC/PATCH] read-cache: write all indexes with the same permissions

2018-11-16 Thread SZEDER Gábor
On Fri, Nov 16, 2018 at 06:41:43PM +0100, Christian Couder wrote: > On Tue, Nov 13, 2018 at 6:34 PM Ævar Arnfjörð Bjarmason > wrote: > > I'm asking whether the bug in this patch isn't revealing an existing > > issue with us not having any tests for N number of sharedindex.* > > files. I.e. we

Re: [RFC/PATCH] read-cache: write all indexes with the same permissions

2018-11-16 Thread Christian Couder
On Tue, Nov 13, 2018 at 6:34 PM Ævar Arnfjörð Bjarmason wrote: > > On Tue, Nov 13 2018, Duy Nguyen wrote: > > > On Tue, Nov 13, 2018 at 4:32 PM Ævar Arnfjörð Bjarmason > > wrote: > > I don't have any bright idea how to catch the literal _X file. > > It's a temporary file and will not last

Re: [RFC/PATCH] read-cache: write all indexes with the same permissions

2018-11-13 Thread Ævar Arnfjörð Bjarmason
On Tue, Nov 13 2018, Duy Nguyen wrote: > On Tue, Nov 13, 2018 at 4:32 PM Ævar Arnfjörð Bjarmason > wrote: >> I won't have time to finish this today, as noted in >> https://public-inbox.org/git/874lcl2e9t@evledraar.gmail.com/ >> there's a pretty major bug here in that we're now writing out

Re: [RFC/PATCH] read-cache: write all indexes with the same permissions

2018-11-13 Thread Duy Nguyen
On Tue, Nov 13, 2018 at 4:32 PM Ævar Arnfjörð Bjarmason wrote: > I won't have time to finish this today, as noted in > https://public-inbox.org/git/874lcl2e9t@evledraar.gmail.com/ > there's a pretty major bug here in that we're now writing out literal > sharedindex_XX files. It's not the

[RFC/PATCH] read-cache: write all indexes with the same permissions

2018-11-13 Thread Ævar Arnfjörð Bjarmason
Change the code that writes out the shared index to use create_tempfile() instead of mks_tempfile(); The create_tempfile() function is used to write out the main .git/index (via .git/index.lock) using lock_file(). The create_tempfile() function respects the umask, whereas the mks_tempfile()