From: Christian Couder <christian.couder@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git <git@vger.kernel.org>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
"Michael Haggerty" <mhagger@alum.mit.edu>,
"Nguyen Thai Ngoc Duy" <pclouds@gmail.com>,
"Christian Couder" <chriscool@tuxfamily.org>
Subject: Re: [PATCH 3/3] t1700: make sure split-index respects core.sharedrepository
Date: Thu, 22 Jun 2017 23:07:21 +0200 [thread overview]
Message-ID: <CAP8UFD1dsC6iY-RJBTJ0utF_EG1+_KNHjqvN=MF9qjo2jDipSA@mail.gmail.com> (raw)
In-Reply-To: <xmqqh8z7ixcc.fsf@gitster.mtv.corp.google.com>
On Thu, Jun 22, 2017 at 10:25 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Christian Couder <christian.couder@gmail.com> writes:
>
>> We use "git config core.sharedrepository 0666" at the beginning of
>> this test, so it will only apply to the shared index files that are
>> created after that.
>>
>> Do you suggest that we test before setting core.sharedrepository that
>> the existing shared index files all have the default permissions?
>
> I think it would be sensible to see at least two values appear.
> Otherwise we cannot tell if the right value is coming by accident
> (because it was the default) or by design (because the configuration
> is correctly read).
Ok, I think I will use something like this then:
while read -r mode modebits filename; do
test_expect_success POSIXPERM "split index respects
core.sharedrepository $mode" '
git config core.sharedrepository "$mode" &&
: >"$filename" &&
git update-index --add "$filename" &&
echo "$modebits" >expect &&
test_modebits .git/index >actual &&
test_cmp expect actual &&
newest_shared_index=$(ls -t .git/sharedindex.* | head -1) &&
test_modebits "$newest_shared_index" >actual &&
test_cmp expect actual
'
done <<\EOF
0666 -rw-rw-rw- seventeen
0642 -rw-r---w- eightteen
EOF
next prev parent reply other threads:[~2017-06-22 21:07 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-22 19:01 [PATCH 1/3] read-cache: use shared perms when writing shared index Christian Couder
2017-06-22 19:01 ` [PATCH 2/3] t1301: move movebits() to test-lib-functions.sh Christian Couder
2017-06-22 19:52 ` Junio C Hamano
2017-06-22 23:09 ` Ramsay Jones
2017-06-23 5:31 ` Junio C Hamano
2017-06-23 15:12 ` Christian Couder
2017-06-22 19:01 ` [PATCH 3/3] t1700: make sure split-index respects core.sharedrepository Christian Couder
2017-06-22 19:53 ` Junio C Hamano
2017-06-22 20:19 ` Christian Couder
2017-06-22 20:25 ` Junio C Hamano
2017-06-22 21:07 ` Christian Couder [this message]
2017-06-22 19:51 ` [PATCH 1/3] read-cache: use shared perms when writing shared index Junio C Hamano
2017-06-23 15:14 ` Christian Couder
2018-11-13 15:22 ` Ævar Arnfjörð Bjarmason
2018-11-13 15:32 ` [RFC/PATCH] read-cache: write all indexes with the same permissions Ævar Arnfjörð Bjarmason
2018-11-13 16:55 ` Duy Nguyen
2018-11-13 17:34 ` Ævar Arnfjörð Bjarmason
2018-11-16 17:41 ` Christian Couder
2018-11-16 19:07 ` SZEDER Gábor
2018-11-16 19:19 ` Duy Nguyen
2018-11-17 6:52 ` Christian Couder
2018-11-17 12:38 ` SZEDER Gábor
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAP8UFD1dsC6iY-RJBTJ0utF_EG1+_KNHjqvN=MF9qjo2jDipSA@mail.gmail.com' \
--to=christian.couder@gmail.com \
--cc=avarab@gmail.com \
--cc=chriscool@tuxfamily.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=mhagger@alum.mit.edu \
--cc=pclouds@gmail.com \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).