t5500: prettify non-commit tag tests

We don't need to use backslash continuation, as the "&&" already provides continuation (and happily soaks up empty lines between commands). We can also expand the multi-line printf into a here-document, which lets us use line breaks more naturally (and avoids another continuation that required us to break the natural indentation). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jeff King committed Jul 3, 2018 at 12:55 UTC 5e834a4f3989d1996d9c394890b7227d5a249a44
1 file changed +13 -6
t/t5500-fetch-pack.sh
+13 -6
@@ -533,19 +533,26 @@ test_expect_success 'test --all wrt tag to non-commits' '
533 # are reachable only via created tag references.
534 blob=$(echo "hello blob" | git hash-object -t blob -w --stdin) &&
535 git tag -a -m "tag -> blob" tag-to-blob $blob &&
536 - \
536 +
537 tree=$(printf "100644 blob $blob\tfile" | git mktree) &&
538 git tag -a -m "tag -> tree" tag-to-tree $tree &&
539 - \
539 +
540 tree2=$(printf "100644 blob $blob\tfile2" | git mktree) &&
541 commit=$(git commit-tree -m "hello commit" $tree) &&
542 git tag -a -m "tag -> commit" tag-to-commit $commit &&
543 - \
543 +
544 blob2=$(echo "hello blob2" | git hash-object -t blob -w --stdin) &&
545 - tag=$(printf "object $blob2\ntype blob\ntag tag-to-blob2\n\
546 -tagger author A U Thor <author@example.com> 0 +0000\n\nhello tag" | git mktag) &&
545 + tag=$(git mktag <<-EOF
546 + object $blob2
547 + type blob
548 + tag tag-to-blob2
549 + tagger author A U Thor <author@example.com> 0 +0000
550 +
551 + hello tag
552 + EOF
553 + ) &&
554 git tag -a -m "tag -> tag" tag-to-tag $tag &&
548 - \
555 +
556 # `fetch-pack --all` should succeed fetching all those objects.
557 mkdir fetchall &&
558 (