All of lore.kernel.org
 help / color / mirror / Atom feed
From: "SZEDER Gábor" <szeder.dev@gmail.com>
To: Christian Couder <christian.couder@gmail.com>
Cc: git <git@vger.kernel.org>, "Junio C Hamano" <gitster@pobox.com>,
	"Jeff King" <peff@peff.net>,
	"Nguyen Thai Ngoc Duy" <pclouds@gmail.com>,
	"Michael Haggerty" <mhagger@alum.mit.edu>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Christian Couder" <chriscool@tuxfamily.org>
Subject: Re: [PATCH v2] read-cache: write all indexes with the same permissions
Date: Sat, 17 Nov 2018 13:24:17 +0100	[thread overview]
Message-ID: <20181117122417.GP30222@szeder.dev> (raw)
In-Reply-To: <CAP8UFD2tC9B_m=NmK4DTCJP=o+L+RKy9C_2ra9fgeNMzOuCZ3A@mail.gmail.com>

On Fri, Nov 16, 2018 at 08:25:43PM +0100, Christian Couder wrote:
> On Fri, Nov 16, 2018 at 7:29 PM SZEDER Gábor <szeder.dev@gmail.com> wrote:
> >
> > 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.

That's just a non-existing file, for which 'test_modebits' will print
nothing, which, in turn, will not match the modebits of '.git/index'.
And the "there are more than one shared index files" case is handled
by the case statement that was snipped from the email context.


  parent reply	other threads:[~2018-11-17 12:24 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-16 17:31 [PATCH v2] read-cache: write all indexes with the same permissions Christian Couder
2018-11-16 18:02 ` Duy Nguyen
2018-11-16 19:10   ` Christian Couder
2018-11-16 19:16     ` Duy Nguyen
2018-11-16 18:29 ` SZEDER Gábor
2018-11-16 19:25   ` Ævar Arnfjörð Bjarmason
2018-11-16 19:25   ` Christian Couder
2018-11-17  8:57     ` Junio C Hamano
2018-11-17 12:24     ` SZEDER Gábor [this message]
2018-11-17  9:29 ` Junio C Hamano
2018-11-17 11:19   ` Christian Couder
2018-11-17 13:05     ` Junio C Hamano
2018-11-17 21:14       ` Ævar Arnfjörð Bjarmason
2018-11-18  7:09         ` Junio C Hamano
2018-11-18 12:03           ` Ævar Arnfjörð Bjarmason
2018-11-18 19:04             ` [PATCH v3] read-cache: make the split index obey umask settings Ævar Arnfjörð Bjarmason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181117122417.GP30222@szeder.dev \
    --to=szeder.dev@gmail.com \
    --cc=avarab@gmail.com \
    --cc=chriscool@tuxfamily.org \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=mhagger@alum.mit.edu \
    --cc=pclouds@gmail.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.