Skip to content

Commit 5458ba0

Browse files
tboegigitster
authored andcommitted
t0003: call dd with portable blocksize
The command `dd bs=101M count=1` is not portable, e.g. dd shipped with MacOs does not understand the 'M'. Use `dd bs=1048576 count=101`, which achives the same, instead. Signed-off-by: Torsten Bögershausen <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0227130 commit 5458ba0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

t/t0003-attributes.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ test_expect_success 'large attributes line ignores trailing content in tree' '
363363

364364
test_expect_success EXPENSIVE 'large attributes file ignored in tree' '
365365
test_when_finished "rm .gitattributes" &&
366-
dd if=/dev/zero of=.gitattributes bs=101M count=1 2>/dev/null &&
366+
dd if=/dev/zero of=.gitattributes bs=1048576 count=101 2>/dev/null &&
367367
git check-attr --all path >/dev/null 2>err &&
368368
echo "warning: ignoring overly large gitattributes file ${SQ}.gitattributes${SQ}" >expect &&
369369
test_cmp expect err
@@ -391,7 +391,7 @@ test_expect_success 'large attributes line ignores trailing content in index' '
391391

392392
test_expect_success EXPENSIVE 'large attributes file ignored in index' '
393393
test_when_finished "git update-index --remove .gitattributes" &&
394-
blob=$(dd if=/dev/zero bs=101M count=1 2>/dev/null | git hash-object -w --stdin) &&
394+
blob=$(dd if=/dev/zero bs=1048576 count=101 2>/dev/null | git hash-object -w --stdin) &&
395395
git update-index --add --cacheinfo 100644,$blob,.gitattributes &&
396396
git check-attr --cached --all path >/dev/null 2>err &&
397397
echo "warning: ignoring overly large gitattributes blob ${SQ}.gitattributes${SQ}" >expect &&

0 commit comments

Comments
 (0)