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:
authorEric Sunshine <sunshine@sunshineco.com>2021-12-09 08:11:04 +0300
committerJunio C Hamano <gitster@pobox.com>2021-12-13 21:29:48 +0300
commit020b813f400b55528edca00aff4d8e95080376f6 (patch)
tree751e5e1376bd0f1a214fcb8f6fbc78bc5d9908a7 /t/t5515-fetch-merge-logic.sh
parent2041b0e8e87adca9f33b499f136445dc015339c8 (diff)
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/t5515-fetch-merge-logic.sh')
-rwxr-xr-xt/t5515-fetch-merge-logic.sh22
1 files changed, 11 insertions, 11 deletions
diff --git a/t/t5515-fetch-merge-logic.sh b/t/t5515-fetch-merge-logic.sh
index 50f14101c5..9d440e2821 100755
--- a/t/t5515-fetch-merge-logic.sh
+++ b/t/t5515-fetch-merge-logic.sh
@@ -105,19 +105,19 @@ test_expect_success setup '
remotes="$remotes config-glob" &&
mkdir -p .git/remotes &&
- {
- echo "URL: ../.git/"
- echo "Pull: refs/heads/main:remotes/rem/main"
- echo "Pull: refs/heads/one:remotes/rem/one"
- echo "Pull: two:remotes/rem/two"
- echo "Pull: refs/heads/three:remotes/rem/three"
- } >.git/remotes/remote-explicit &&
+ cat >.git/remotes/remote-explicit <<-\EOF &&
+ URL: ../.git/
+ Pull: refs/heads/main:remotes/rem/main
+ Pull: refs/heads/one:remotes/rem/one
+ Pull: two:remotes/rem/two
+ Pull: refs/heads/three:remotes/rem/three
+ EOF
remotes="$remotes remote-explicit" &&
- {
- echo "URL: ../.git/"
- echo "Pull: refs/heads/*:refs/remotes/rem/*"
- } >.git/remotes/remote-glob &&
+ cat >.git/remotes/remote-glob <<-\EOF &&
+ URL: ../.git/
+ Pull: refs/heads/*:refs/remotes/rem/*
+ EOF
remotes="$remotes remote-glob" &&
mkdir -p .git/branches &&