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

2018-11-18 Thread Ævar Arnfjörð Bjarmason
On Sun, Nov 18 2018, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > >> Do you mean that you don't agree that following should always create >> both "foo" and e.g. ".git/refs/heads/master" with the same 644 >> (-rw-rw-r--) mode: >> >> ( >> rm -rf /tmp/repo && >>

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

2018-11-17 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > Do you mean that you don't agree that following should always create > both "foo" and e.g. ".git/refs/heads/master" with the same 644 > (-rw-rw-r--) mode: > > ( > rm -rf /tmp/repo && > umask 022 && > git init /tmp/repo && > cd

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

2018-11-17 Thread Ævar Arnfjörð Bjarmason
On Sat, Nov 17 2018, Junio C Hamano wrote: > Christian Couder writes: > >> "However, as noted in those commits we'd still create the file as >> 0600, and would just re-chmod it only if core.sharedRepository is set >> to "true" or "all". If core.sharedRepository is unset or set to >> "false",

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

2018-11-17 Thread Junio C Hamano
Christian Couder writes: > "However, as noted in those commits we'd still create the file as > 0600, and would just re-chmod it only if core.sharedRepository is set > to "true" or "all". If core.sharedRepository is unset or set to > "false", then the file mode will not be changed, so without >

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

2018-11-17 Thread SZEDER Gábor
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 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

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

2018-11-17 Thread Christian Couder
On Sat, Nov 17, 2018 at 10:29 AM Junio C Hamano wrote: > > Christian Couder writes: > > > However, as noted in those commits we'd still create the file as 0600, > > and would just re-chmod it depending on the setting of > > core.sharedRepository. So without core.splitIndex a system with > > e.g.

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

2018-11-17 Thread Junio C Hamano
Christian Couder writes: > However, as noted in those commits we'd still create the file as 0600, > and would just re-chmod it depending on the setting of > core.sharedRepository. So without core.splitIndex a system with > e.g. the umask set to group writeability would work for the members of >

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

2018-11-17 Thread Junio C Hamano
Christian Couder writes: >> > +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 && >> > +

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

2018-11-16 Thread Christian Couder
On Fri, Nov 16, 2018 at 7:29 PM SZEDER Gábor 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 > >

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

2018-11-16 Thread Ævar Arnfjörð Bjarmason
On Fri, Nov 16 2018, SZEDER Gábor 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

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

2018-11-16 Thread Duy Nguyen
On Fri, Nov 16, 2018 at 8:10 PM Christian Couder wrote: > > On Fri, Nov 16, 2018 at 7:03 PM Duy Nguyen wrote: > > > > On Fri, Nov 16, 2018 at 6:31 PM Christian Couder > > wrote: > > > diff --git a/read-cache.c b/read-cache.c > > > index 8c924506dd..ea80600bff 100644 > > > --- a/read-cache.c > >

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

2018-11-16 Thread Christian Couder
On Fri, Nov 16, 2018 at 7:03 PM Duy Nguyen wrote: > > On Fri, Nov 16, 2018 at 6:31 PM Christian Couder > wrote: > > diff --git a/read-cache.c b/read-cache.c > > index 8c924506dd..ea80600bff 100644 > > --- a/read-cache.c > > +++ b/read-cache.c > > @@ -3165,7 +3165,8 @@ int

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

2018-11-16 Thread SZEDER Gábor
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

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

2018-11-16 Thread Duy Nguyen
On Fri, Nov 16, 2018 at 6:31 PM Christian Couder wrote: > diff --git a/read-cache.c b/read-cache.c > index 8c924506dd..ea80600bff 100644 > --- a/read-cache.c > +++ b/read-cache.c > @@ -3165,7 +3165,8 @@ int write_locked_index(struct index_state *istate, > struct lock_file *lock, >