summaryrefslogtreecommitdiff
path: root/t/t5510-fetch.sh
diff options
context:
space:
mode:
authorLibravatar Eric Sunshine <sunshine@sunshineco.com>2021-12-09 00:11:04 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-12-13 10:29:48 -0800
commit020b813f400b55528edca00aff4d8e95080376f6 (patch)
tree751e5e1376bd0f1a214fcb8f6fbc78bc5d9908a7 /t/t5510-fetch.sh
parentt9107: use shell parameter expansion to avoid breaking &&-chain (diff)
downloadtgif-020b813f400b55528edca00aff4d8e95080376f6.tar.xz
tests: simplify construction of large blocks of text
Take advantage of here-docs to create large blocks of text rather than using a series of `echo` statements. Not only are here-docs a natural fit for such a task, but there is less opportunity for a broken &&-chain. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Reviewed-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5510-fetch.sh')
-rwxr-xr-xt/t5510-fetch.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
index a0faf0dd94..1892d6615a 100755
--- a/t/t5510-fetch.sh
+++ b/t/t5510-fetch.sh
@@ -40,11 +40,11 @@ test_expect_success "clone and setup child repos" '
git config branch.main.remote two &&
git config branch.main.merge refs/heads/one &&
mkdir -p .git/remotes &&
- {
- echo "URL: ../two/.git/"
- echo "Pull: refs/heads/main:refs/heads/two"
- echo "Pull: refs/heads/one:refs/heads/one"
- } >.git/remotes/two
+ cat >.git/remotes/two <<-\EOF
+ URL: ../two/.git/
+ Pull: refs/heads/main:refs/heads/two
+ Pull: refs/heads/one:refs/heads/one
+ EOF
) &&
git clone . bundle &&
git clone . seven