diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-06-30 14:30:31 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-06-30 14:30:31 -0700 |
| commit | e3aa0eafbdaace1f75e70dd573cfae45c1aa752f (patch) | |
| tree | 4a6ab6d4faa0dc27a547506e71832d5382ea7e35 /t/t7422-submodule-output.sh | |
| parent | d2e49d2b7682651283fbc1160e0bdb13eaf24df8 (diff) | |
| parent | b32c7ec02f6407bf3445b0fedf6c7294179b7e49 (diff) | |
| download | git-e3aa0eafbdaace1f75e70dd573cfae45c1aa752f.tar.gz | |
Merge branch 'jk/test-seq-format'
A test helper "test_seq" function learned the "-f <fmt>" option,
which allowed us to simplify a lot of test scripts.
* jk/test-seq-format:
test-lib: teach test_seq the -f option
t7422: replace confusing printf with echo
Diffstat (limited to 't/t7422-submodule-output.sh')
| -rwxr-xr-x | t/t7422-submodule-output.sh | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/t/t7422-submodule-output.sh b/t/t7422-submodule-output.sh index 023a5cbdc4..aea1ddf117 100755 --- a/t/t7422-submodule-output.sh +++ b/t/t7422-submodule-output.sh @@ -180,17 +180,14 @@ test_expect_success !MINGW 'git submodule status --recursive propagates SIGPIPE' COMMIT=$(git rev-parse HEAD) && for i in $(test_seq 2000) do - printf "[submodule \"sm-$i\"]\npath = recursive-submodule-path-$i\n" "$i" || + echo "[submodule \"sm-$i\"]" && + echo "path = recursive-submodule-path-$i" || return 1 done >gitmodules && BLOB=$(git hash-object -w --stdin <gitmodules) && printf "100644 blob $BLOB\t.gitmodules\n" >tree && - for i in $(test_seq 2000) - do - printf "160000 commit $COMMIT\trecursive-submodule-path-%d\n" "$i" || - return 1 - done >>tree && + test_seq -f "160000 commit $COMMIT\trecursive-submodule-path-%d" 2000 >>tree && TREE=$(git mktree <tree) && COMMIT=$(git commit-tree "$TREE") && |
