From: Aaron Plattner Date: Wed, 18 Feb 2026 18:10:19 +0000 (-0800) Subject: t: use test_seq -f and pipes in a few more places X-Git-Tag: v2.54.0-rc0~148^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0678e01f0211f4e3310f3c01b3425da53aa63677;p=thirdparty%2Fgit.git t: use test_seq -f and pipes in a few more places Several tests use a pattern that writes to a temporary file like this: printf "do something with %d\n" $(test_seq ) >tmpfile && git do-something --stdin >input && git do-something --stdin | git do-something --stdin Signed-off-by: Aaron Plattner Signed-off-by: Junio C Hamano --- diff --git a/t/pack-refs-tests.sh b/t/pack-refs-tests.sh index 81086c3690..2fdaccb6c7 100644 --- a/t/pack-refs-tests.sh +++ b/t/pack-refs-tests.sh @@ -354,8 +354,8 @@ do # Create 14 additional references, which brings us to # 15 together with the default branch. - printf "create refs/heads/loose-%d HEAD\n" $(test_seq 14) >stdin && - git update-ref --stdin stdin && - git update-ref --stdin stdin && - git update-ref --stdin stdin && - git update-ref --stdin stdin && - git update-ref --stdin input && - git update-ref --stdin expect <<-EOF && @@ -178,8 +178,8 @@ test_expect_success 'restart interval at every single record' ' ( cd repo && test_commit initial && - test_seq -f "update refs/heads/branch-%d HEAD" 10 >input && - git update-ref --stdin expect <<-EOF && @@ -218,8 +218,8 @@ test_expect_success 'object index gets written by default with ref index' ' ( cd repo && test_commit initial && - test_seq -f "update refs/heads/branch-%d HEAD" 5 >input && - git update-ref --stdin expect <<-EOF && @@ -253,8 +253,8 @@ test_expect_success 'object index can be disabled' ' ( cd repo && test_commit initial && - test_seq -f "update refs/heads/branch-%d HEAD" 5 >input && - git update-ref --stdin expect <<-EOF && diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh index db7f5444da..0f68a7dd42 100755 --- a/t/t1400-update-ref.sh +++ b/t/t1400-update-ref.sh @@ -1380,16 +1380,16 @@ test_expect_success 'fails with duplicate ref update via symref' ' test_expect_success ULIMIT_FILE_DESCRIPTORS 'large transaction creating branches does not burst open file limit' ' ( - test_seq -f "create refs/heads/%d HEAD" 33 >large_input && - run_with_limited_open_files git update-ref --stdin large_input && - run_with_limited_open_files git update-ref --stdin stdin && - git -C repo update-ref --stdin stdin && - git -C repo update-ref --stdin tree && - tree=$(git mktree input && - git update-ref --stdin