Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorsten Bögershausen <tboegi@web.de>2023-01-22 09:28:39 +0300
committerJunio C Hamano <gitster@pobox.com>2023-01-22 19:14:40 +0300
commit5458ba0a4d2c65ddf7c844fd976906e04f61569a (patch)
treed9a8cb5c05e76554f693841a4663c5870182bdc4 /t/t0003-attributes.sh
parent0227130244c007870c106fc613903d078730e45c (diff)
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 <tboegi@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t0003-attributes.sh')
-rwxr-xr-xt/t0003-attributes.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t0003-attributes.sh b/t/t0003-attributes.sh
index 9d9aa2855d..07dc8c938e 100755
--- a/t/t0003-attributes.sh
+++ b/t/t0003-attributes.sh
@@ -363,7 +363,7 @@ test_expect_success 'large attributes line ignores trailing content in tree' '
test_expect_success EXPENSIVE 'large attributes file ignored in tree' '
test_when_finished "rm .gitattributes" &&
- dd if=/dev/zero of=.gitattributes bs=101M count=1 2>/dev/null &&
+ dd if=/dev/zero of=.gitattributes bs=1048576 count=101 2>/dev/null &&
git check-attr --all path >/dev/null 2>err &&
echo "warning: ignoring overly large gitattributes file ${SQ}.gitattributes${SQ}" >expect &&
test_cmp expect err
@@ -391,7 +391,7 @@ test_expect_success 'large attributes line ignores trailing content in index' '
test_expect_success EXPENSIVE 'large attributes file ignored in index' '
test_when_finished "git update-index --remove .gitattributes" &&
- blob=$(dd if=/dev/zero bs=101M count=1 2>/dev/null | git hash-object -w --stdin) &&
+ blob=$(dd if=/dev/zero bs=1048576 count=101 2>/dev/null | git hash-object -w --stdin) &&
git update-index --add --cacheinfo 100644,$blob,.gitattributes &&
git check-attr --cached --all path >/dev/null 2>err &&
echo "warning: ignoring overly large gitattributes blob ${SQ}.gitattributes${SQ}" >expect &&