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

Re: [PATCH 3/3] t1700: make sure split-index respects core.sharedrepository

From
Christian Couder <christian.couder@gmail.com>
Date
Jun 22, 2017, 21:07 UTC
Message-ID
<CAP8UFD1dsC6iY-RJBTJ0utF_EG1+_KNHjqvN=MF9qjo2jDipSA@mail.gmail.com>
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:
Show 13 quoted lines
> 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
Previous: Junio C HamanoNext: Junio C Hamano
Message 11 of 22 in “read-cache: use shared perms when writing shared index”
  1. 1/3 read-cache: use shared perms when writing shared indexChristian Couder, Jun 22, 2017
  2. 2/3 t1301: move movebits() to test-lib-functions.shChristian Couder, Jun 22, 2017
  3. Junio C HamanoJun 22, 2017
  4. Ramsay JonesJun 22, 2017
  5. Junio C HamanoJun 23, 2017
  6. Christian CouderJun 23, 2017
  7. 3/3 t1700: make sure split-index respects core.sharedrepositoryChristian Couder, Jun 22, 2017
  8. Junio C HamanoJun 22, 2017
  9. Christian CouderJun 22, 2017
  10. Junio C HamanoJun 22, 2017
  11. Christian CouderJun 22, 2017
  12. Junio C HamanoJun 22, 2017
  13. Christian CouderJun 23, 2017
  14. Ævar Arnfjörð BjarmasonNov 13, 2018
  15. read-cache: write all indexes with the same permissionsÆvar Arnfjörð Bjarmason, Nov 13, 2018
  16. Duy NguyenNov 13, 2018
  17. Ævar Arnfjörð BjarmasonNov 13, 2018
  18. Christian CouderNov 16, 2018
  19. SZEDER GáborNov 16, 2018
  20. Duy NguyenNov 16, 2018
  21. Christian CouderNov 17, 2018
  22. SZEDER GáborNov 17, 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.