{"thread":{"id":"57239","subject":"[PATCH ab/fsck-unexpected-type] t1450-fsck: exec-bit is not needed to make loose object writable","startedAt":"2022-01-13T20:28:51Z","lastAt":"2022-01-13T23:05:06Z","messageCount":2,"participants":["Johannes Sixt","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"446181","messageId":"529d99f3-13c8-ffc1-dd4c-3fc70330262a@kdbg.org","threadId":"57239","inReplyTo":null,"subject":"[PATCH ab/fsck-unexpected-type] t1450-fsck: exec-bit is not needed to make loose object writable","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2022-01-13T20:28:45Z","receivedAt":"2022-01-13T20:28:51Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"A test case wants to append stuff to a loose object file to ensure\nthat this kind of corruption is detected. To make a read-only loose\nobject file writable with chmod, it is not necessary to also make\nit executable. Replace the bitmask 755 with the instruction +w to\nrequest only the write bit and to also heed the umask. And get rid\nof a POSIXPERM prerequisite, which is unnecessary for the test.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n I happened to notice this by chance when I built on Windows today.\n\n t/t1450-fsck.sh | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t1450-fsck.sh b/t/t1450-fsck.sh\nindex 6337236fd8..de50c0ea01 100755\n--- a/t/t1450-fsck.sh\n+++ b/t/t1450-fsck.sh\n@@ -94,13 +94,13 @@ test_expect_success 'object with hash and type mismatch' '\n \t)\n '\n \n-test_expect_success POSIXPERM 'zlib corrupt loose object output ' '\n+test_expect_success 'zlib corrupt loose object output ' '\n \tgit init --bare corrupt-loose-output &&\n \t(\n \t\tcd corrupt-loose-output &&\n \t\toid=$(git hash-object -w --stdin --literally </dev/null) &&\n \t\toidf=objects/$(test_oid_to_path \"$oid\") &&\n-\t\tchmod 755 $oidf &&\n+\t\tchmod +w $oidf &&\n \t\techo extra garbage >>$oidf &&\n \n \t\tcat >expect.error <<-EOF &&\n-- \n2.34.1.141.g867d0e9267\n\n"},{"id":"446189","messageId":"xmqqpmovfd9h.fsf@gitster.g","threadId":"57239","inReplyTo":"529d99f3-13c8-ffc1-dd4c-3fc70330262a@kdbg.org","subject":"Re: [PATCH ab/fsck-unexpected-type] t1450-fsck: exec-bit is not needed to make loose object writable","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2022-01-13T23:04:58Z","receivedAt":"2022-01-13T23:05:06Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Sixt <j6t@kdbg.org> writes:\n\n> A test case wants to append stuff to a loose object file to ensure\n> that this kind of corruption is detected. To make a read-only loose\n> object file writable with chmod, it is not necessary to also make\n> it executable. Replace the bitmask 755 with the instruction +w to\n> request only the write bit and to also heed the umask. And get rid\n> of a POSIXPERM prerequisite, which is unnecessary for the test.\n>\n> Signed-off-by: Johannes Sixt <j6t@kdbg.org>\n> ---\n>  I happened to notice this by chance when I built on Windows today.\n\nThanks.  Looks quite sensible.\n\n>\n>  t/t1450-fsck.sh | 4 ++--\n>  1 file changed, 2 insertions(+), 2 deletions(-)\n>\n> diff --git a/t/t1450-fsck.sh b/t/t1450-fsck.sh\n> index 6337236fd8..de50c0ea01 100755\n> --- a/t/t1450-fsck.sh\n> +++ b/t/t1450-fsck.sh\n> @@ -94,13 +94,13 @@ test_expect_success 'object with hash and type mismatch' '\n>  \t)\n>  '\n>  \n> -test_expect_success POSIXPERM 'zlib corrupt loose object output ' '\n> +test_expect_success 'zlib corrupt loose object output ' '\n>  \tgit init --bare corrupt-loose-output &&\n>  \t(\n>  \t\tcd corrupt-loose-output &&\n>  \t\toid=$(git hash-object -w --stdin --literally </dev/null) &&\n>  \t\toidf=objects/$(test_oid_to_path \"$oid\") &&\n> -\t\tchmod 755 $oidf &&\n> +\t\tchmod +w $oidf &&\n>  \t\techo extra garbage >>$oidf &&\n>  \n>  \t\tcat >expect.error <<-EOF &&\n"}]}