Skip to content

Commit 5906910

Browse files
j6tgitster
authored andcommitted
t1450-fsck: exec-bit is not needed to make loose object writable
A test case wants to append stuff to a loose object file to ensure that this kind of corruption is detected. To make a read-only loose object file writable with chmod, it is not necessary to also make it executable. Replace the bitmask 755 with the instruction +w to request only the write bit and to also heed the umask. And get rid of a POSIXPERM prerequisite, which is unnecessary for the test. Signed-off-by: Johannes Sixt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e9d7761 commit 5906910

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

t/t1450-fsck.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,13 @@ test_expect_success 'object with hash and type mismatch' '
9494
)
9595
'
9696

97-
test_expect_success POSIXPERM 'zlib corrupt loose object output ' '
97+
test_expect_success 'zlib corrupt loose object output ' '
9898
git init --bare corrupt-loose-output &&
9999
(
100100
cd corrupt-loose-output &&
101101
oid=$(git hash-object -w --stdin --literally </dev/null) &&
102102
oidf=objects/$(test_oid_to_path "$oid") &&
103-
chmod 755 $oidf &&
103+
chmod +w $oidf &&
104104
echo extra garbage >>$oidf &&
105105
106106
cat >expect.error <<-EOF &&

0 commit comments

Comments
 (0)