Re: [PATCH 1/3] read-cache: use shared perms when writing shared index
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Nov 13, 2018, 15:22 UTC
- Message-ID
- <874lcl2e9t.fsf@evledraar.gmail.com>
- In-Reply-To
- <xmqq8tkjkdgl.fsf@gitster.mtv.corp.google.com>
On Thu, 22 Jun 2017 12:51:54 -0700 Junio wrote:
Show 10 quoted lines
> > Let's fix that by using create_tempfile() instead of mks_tempfile()
> > to create the shared index file.
> >
> > ...
> > - fd = mks_tempfile(&temporary_sharedindex, git_path("sharedindex_XXXXXX"));
> > + fd = create_tempfile(&temporary_sharedindex, git_path("sharedindex_XXXXXX"));
>
> So we used to create a temporary file that made sure its name is
> unique but now we create sharedindex_XXXXXX with 6 X's literally
> at the end?I'm looking at some of this again. Yeah that was a bug in Christian's code, but interestingly if you just create literal sharedindex_XXXXXX files (don't replace the X's) the whole test suite passes under GIT_TEST_SPLIT_INDEX=true
That seems like a major blindspot, i.e. we don't seem to have tests that stress test the case of >1 split index.