t5516: remove surrounding empty lines in test bodies

This style with the empty lines in test bodies was from when the test suite was being developed. Remove the empty lines to match the modern test style. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Denton Liu committed Aug 8, 2025 at 00:24 UTC 31e5d037df96793c520215f65cc192cc6ac5847c
1 file changed -51
t/t5516-fetch-push.sh
-51
@@ -105,7 +105,6 @@ check_push_result () {
105 }
106
107 test_expect_success setup '
108 -
108 >path1 &&
109 git add path1 &&
110 test_tick &&
@@ -117,7 +116,6 @@ test_expect_success setup '
116 test_tick &&
117 git commit -a -m second &&
118 the_commit=$(git show-ref -s --verify refs/heads/main)
120 -
119 '
120
121 for cmd in push fetch
@@ -322,104 +320,82 @@ test_expect_success 'push with pushInsteadOf and explicit pushurl (pushInsteadOf
320 '
321
322 test_expect_success 'push with matching heads' '
325 -
323 mk_test testrepo heads/main &&
324 git push testrepo : &&
325 check_push_result testrepo $the_commit heads/main
329 -
326 '
327
328 test_expect_success 'push with matching heads on the command line' '
333 -
329 mk_test testrepo heads/main &&
330 git push testrepo : &&
331 check_push_result testrepo $the_commit heads/main
337 -
332 '
333
334 test_expect_success 'failed (non-fast-forward) push with matching heads' '
341 -
335 mk_test testrepo heads/main &&
336 git push testrepo : &&
337 git commit --amend -massaged &&
338 test_must_fail git push testrepo &&
339 check_push_result testrepo $the_commit heads/main &&
340 git reset --hard $the_commit
348 -
341 '
342
343 test_expect_success 'push --force with matching heads' '
352 -
344 mk_test testrepo heads/main &&
345 git push testrepo : &&
346 git commit --amend -massaged &&
347 git push --force testrepo : &&
348 ! check_push_result testrepo $the_commit heads/main &&
349 git reset --hard $the_commit
359 -
350 '
351
352 test_expect_success 'push with matching heads and forced update' '
363 -
353 mk_test testrepo heads/main &&
354 git push testrepo : &&
355 git commit --amend -massaged &&
356 git push testrepo +: &&
357 ! check_push_result testrepo $the_commit heads/main &&
358 git reset --hard $the_commit
370 -
359 '
360
361 test_expect_success 'push with no ambiguity (1)' '
374 -
362 mk_test testrepo heads/main &&
363 git push testrepo main:main &&
364 check_push_result testrepo $the_commit heads/main
378 -
365 '
366
367 test_expect_success 'push with no ambiguity (2)' '
382 -
368 mk_test testrepo remotes/origin/main &&
369 git push testrepo main:origin/main &&
370 check_push_result testrepo $the_commit remotes/origin/main
386 -
371 '
372
373 test_expect_success 'push with colon-less refspec, no ambiguity' '
390 -
374 mk_test testrepo heads/main heads/t/main &&
375 git branch -f t/main main &&
376 git push testrepo main &&
377 check_push_result testrepo $the_commit heads/main &&
378 check_push_result testrepo $the_first_commit heads/t/main
396 -
379 '
380
381 test_expect_success 'push with weak ambiguity (1)' '
400 -
382 mk_test testrepo heads/main remotes/origin/main &&
383 git push testrepo main:main &&
384 check_push_result testrepo $the_commit heads/main &&
385 check_push_result testrepo $the_first_commit remotes/origin/main
405 -
386 '
387
388 test_expect_success 'push with weak ambiguity (2)' '
409 -
389 mk_test testrepo heads/main remotes/origin/main remotes/another/main &&
390 git push testrepo main:main &&
391 check_push_result testrepo $the_commit heads/main &&
392 check_push_result testrepo $the_first_commit remotes/origin/main remotes/another/main
414 -
393 '
394
395 test_expect_success 'push with ambiguity' '
418 -
396 mk_test testrepo heads/frotz tags/frotz &&
397 test_must_fail git push testrepo main:frotz &&
398 check_push_result testrepo $the_first_commit heads/frotz tags/frotz
422 -
399 '
400
401 test_expect_success 'push with onelevel ref' '
@@ -428,17 +404,14 @@ test_expect_success 'push with onelevel ref' '
404 '
405
406 test_expect_success 'push with colon-less refspec (1)' '
431 -
407 mk_test testrepo heads/frotz tags/frotz &&
408 git branch -f frotz main &&
409 git push testrepo frotz &&
410 check_push_result testrepo $the_commit heads/frotz &&
411 check_push_result testrepo $the_first_commit tags/frotz
437 -
412 '
413
414 test_expect_success 'push with colon-less refspec (2)' '
441 -
415 mk_test testrepo heads/frotz tags/frotz &&
416 if git show-ref --verify -q refs/heads/frotz
417 then
@@ -448,7 +421,6 @@ test_expect_success 'push with colon-less refspec (2)' '
421 git push -f testrepo frotz &&
422 check_push_result testrepo $the_commit tags/frotz &&
423 check_push_result testrepo $the_first_commit heads/frotz
451 -
424 '
425
426 test_expect_success 'push with colon-less refspec (3)' '
@@ -465,7 +437,6 @@ test_expect_success 'push with colon-less refspec (3)' '
437 '
438
439 test_expect_success 'push with colon-less refspec (4)' '
468 -
440 mk_test testrepo &&
441 if git show-ref --verify -q refs/heads/frotz
442 then
@@ -475,38 +446,29 @@ test_expect_success 'push with colon-less refspec (4)' '
446 git push testrepo frotz &&
447 check_push_result testrepo $the_commit tags/frotz &&
448 test 1 = $( cd testrepo && git show-ref | wc -l )
478 -
449 '
450
451 test_expect_success 'push head with non-existent, incomplete dest' '
482 -
452 mk_test testrepo &&
453 git push testrepo main:branch &&
454 check_push_result testrepo $the_commit heads/branch
486 -
455 '
456
457 test_expect_success 'push tag with non-existent, incomplete dest' '
490 -
458 mk_test testrepo &&
459 git tag -f v1.0 &&
460 git push testrepo v1.0:tag &&
461 check_push_result testrepo $the_commit tags/tag
495 -
462 '
463
464 test_expect_success 'push oid with non-existent, incomplete dest' '
499 -
465 mk_test testrepo &&
466 test_must_fail git push testrepo $(git rev-parse main):foo
502 -
467 '
468
469 test_expect_success 'push ref expression with non-existent, incomplete dest' '
506 -
470 mk_test testrepo &&
471 test_must_fail git push testrepo main^:branch
509 -
472 '
473
474 for head in HEAD @
@@ -550,7 +512,6 @@ do
512 git checkout main &&
513 git push testrepo $head:branch &&
514 check_push_result testrepo $the_commit heads/branch
553 -
515 '
516
517 test_expect_success "push with config remote.*.push = $head" '
@@ -596,7 +557,6 @@ test_expect_success 'push with remote.pushdefault' '
557 '
558
559 test_expect_success 'push with config remote.*.pushurl' '
599 -
560 mk_test testrepo heads/main &&
561 git checkout main &&
562 test_config remote.there.url test2repo &&
@@ -655,7 +615,6 @@ test_expect_success 'push ignores "branch." config without subsection' '
615 '
616
617 test_expect_success 'push with dry-run' '
658 -
618 mk_test testrepo heads/main &&
619 old_commit=$(git -C testrepo show-ref -s --verify refs/heads/main) &&
620 git push --dry-run testrepo : &&
@@ -663,7 +622,6 @@ test_expect_success 'push with dry-run' '
622 '
623
624 test_expect_success 'push updates local refs' '
666 -
625 mk_test testrepo heads/main &&
626 mk_child testrepo child &&
627 (
@@ -673,11 +631,9 @@ test_expect_success 'push updates local refs' '
631 test $(git rev-parse main) = \
632 $(git rev-parse remotes/origin/main)
633 )
676 -
634 '
635
636 test_expect_success 'push updates up-to-date local refs' '
680 -
637 mk_test testrepo heads/main &&
638 mk_child testrepo child1 &&
639 mk_child testrepo child2 &&
@@ -689,11 +645,9 @@ test_expect_success 'push updates up-to-date local refs' '
645 test $(git rev-parse main) = \
646 $(git rev-parse remotes/origin/main)
647 )
692 -
648 '
649
650 test_expect_success 'push preserves up-to-date packed refs' '
696 -
651 mk_test testrepo heads/main &&
652 mk_child testrepo child &&
653 (
@@ -701,11 +655,9 @@ test_expect_success 'push preserves up-to-date packed refs' '
655 git push &&
656 ! test -f .git/refs/remotes/origin/main
657 )
704 -
658 '
659
660 test_expect_success 'push does not update local refs on failure' '
708 -
661 mk_test testrepo heads/main &&
662 mk_child testrepo child &&
663 echo "#!/no/frobnication/today" >testrepo/.git/hooks/pre-receive &&
@@ -717,16 +669,13 @@ test_expect_success 'push does not update local refs on failure' '
669 test $(git rev-parse main) != \
670 $(git rev-parse remotes/origin/main)
671 )
720 -
672 '
673
674 test_expect_success 'allow deleting an invalid remote ref' '
724 -
675 mk_test testrepo heads/branch &&
676 rm -f testrepo/.git/objects/??/* &&
677 git push testrepo :refs/heads/branch &&
678 (cd testrepo && test_must_fail git rev-parse --verify refs/heads/branch)
729 -
679 '
680
681 test_expect_success 'pushing valid refs triggers post-receive and post-update hooks' '