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

Re: [PATCH] t4129: fix setfacl-related permissions failure

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 9, 2021, 22:43 UTC
Message-ID
<xmqqk0slenof.fsf@gitster.c.googlers.com>
In-Reply-To
<CAHd-oW7r9D09F7=3JLTiQcbRDXyXhkYY3FFuRLbR9vH=p4M92w@mail.gmail.com>
Matheus Tavares Bernardino <matheus.bernardino@usp.br> writes:
Show 40 quoted lines
> Hi, Adam
>
> Apologies for the late reply.
>
> On Wed, Dec 23, 2020 at 8:44 AM Adam Dinwoodie <adam@dinwoodie.org> wrote:
>>
>> When running this test in Cygwin, it's necessary to remove the inherited
>> access control lists from the Git working directory in order for later
>> permissions tests to work as expected.
>
> Nit: Although this sentence is correct and the bug was first found on
> Cygwin, the test may fail in any other environment which has a default
> ACL set. In this sense, I think we could perhaps rephrase the commit
> message to something like this:
>
> This test creates a couple files and expects their permissions to be
> based on the umask. However, if the test's directory has a default ACL
> set, it will be inherited by the created files, overriding the umask.
> To work around that, the test attempts to remove the default ACL, but
> it erroneously passes a nonexistent path to the setfacl command. Fix
> that by passing the working directory.
>
>> ---
>>  t/t4129-apply-samemode.sh | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/t/t4129-apply-samemode.sh b/t/t4129-apply-samemode.sh
>> index 41818d8315..576632f868 100755
>> --- a/t/t4129-apply-samemode.sh
>> +++ b/t/t4129-apply-samemode.sh
>> @@ -78,7 +78,7 @@ test_expect_success POSIXPERM 'do not use core.sharedRepository for working tree
>>         test_config core.sharedRepository 0666 &&
>>         (
>>                 # Remove a default ACL if possible.
>> -               (setfacl -k newdir 2>/dev/null || true) &&
>> +               (setfacl -k . 2>/dev/null || true) &&
>
> The change is obviously correct, thanks!
>
> Reviewed-by: Matheus Tavares <matheus.bernardino@usp.br>
Thanks, both.  Will queue.
Previous: Matheus Tavares BernardinoNext: Junio C Hamano
Message 15 of 17 in “Is git-am expected to honor core.sharedRepository?”
  1. Matheus Tavares BernardinoDec 1, 2020
  2. Junio C HamanoDec 1, 2020
  3. apply: don't use core.sharedRepository to create working tree filesMatheus Tavares, Dec 1, 2020
  4. Junio C HamanoDec 2, 2020
  5. Adam DinwoodieDec 19, 2020
  6. Junio C HamanoDec 19, 2020
  7. Adam DinwoodieDec 19, 2020
  8. Achim GratzDec 19, 2020
  9. Adam DinwoodieDec 19, 2020
  10. Achim GratzDec 19, 2020
  11. Adam DinwoodieDec 22, 2020
  12. Matheus Tavares BernardinoDec 22, 2020
  13. t4129: fix setfacl-related permissions failureAdam Dinwoodie, Dec 23, 2020
  14. Matheus Tavares BernardinoJan 9, 2021
  15. Junio C HamanoJan 9, 2021
  16. Junio C HamanoDec 2, 2020
  17. Matheus Tavares BernardinoDec 3, 2020

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.