Subject: Re: [PATCH 1/3] read-cache: use shared perms when writing shared index

From: Ævar Arnfjörð Bjarmason <[email-masked]>
Date: Tue, 13 Nov 2018 16:22:38 +0100

On Thu, 22 Jun 2017 12:51:54 -0700 Junio wrote:

> > 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.