git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Christian Couder <christian.couder@gmail.com>
Date
Nov 16, 2018, 19:25 UTC
Message-ID
<CAP8UFD2tC9B_m=NmK4DTCJP=o+L+RKy9C_2ra9fgeNMzOuCZ3A@mail.gmail.com>
In-Reply-To
<20181116182934.GN30222@szeder.dev>
On Fri, Nov 16, 2018 at 7:29 PM SZEDER Gábor <szeder.dev@gmail.com> wrote:
Show 25 quoted lines
>
> On Fri, Nov 16, 2018 at 06:31:05PM +0100, Christian Couder wrote:
> > diff --git a/t/t1700-split-index.sh b/t/t1700-split-index.sh
> > index 2ac47aa0e4..fa1d3d468b 100755
> > --- a/t/t1700-split-index.sh
> > +++ b/t/t1700-split-index.sh
> > @@ -381,6 +381,26 @@ test_expect_success 'check splitIndex.sharedIndexExpire set to "never" and "now"
> >       test $(ls .git/sharedindex.* | wc -l) -le 2
> >  '
> >
> > +test_expect_success POSIXPERM 'same mode for index & split index' '
> > +     git init same-mode &&
> > +     (
> > +             cd same-mode &&
> > +             test_commit A &&
> > +             test_modebits .git/index >index_mode &&
> > +             test_must_fail git config core.sharedRepository &&
> > +             git -c core.splitIndex=true status &&
> > +             shared=$(ls .git/sharedindex.*) &&
>
> I think the command substitution and 'ls' are unnecessary, and
>
>   shared=.git/sharedindex.*
>
> would work as well.
If there is no shared index file with the above we would get:

shared=.git/sharedindex.* $ echo $shared .git/sharedindex.*

which seems bug prone to me.
Previous: Ævar Arnfjörð BjarmasonNext: Junio C Hamano
Message 7 of 16 in “read-cache: write all indexes with the same permissions”
  1. read-cache: write all indexes with the same permissionsChristian Couder, Nov 16, 2018
  2. Duy NguyenNov 16, 2018
  3. Christian CouderNov 16, 2018
  4. Duy NguyenNov 16, 2018
  5. SZEDER GáborNov 16, 2018
  6. Ævar Arnfjörð BjarmasonNov 16, 2018
  7. Christian CouderNov 16, 2018
  8. Junio C HamanoNov 17, 2018
  9. SZEDER GáborNov 17, 2018
  10. Junio C HamanoNov 17, 2018
  11. Christian CouderNov 17, 2018
  12. Junio C HamanoNov 17, 2018
  13. Ævar Arnfjörð BjarmasonNov 17, 2018
  14. Junio C HamanoNov 18, 2018
  15. Ævar Arnfjörð BjarmasonNov 18, 2018
  16. read-cache: make the split index obey umask settingsÆvar Arnfjörð Bjarmason, Nov 18, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.