@matheusbsbs / matheus-bagliano / commits / 65f83dc082
Fork 0

t5505: remove unnecessary subshell invocations

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Brandon Casey committed Mar 19, 2010 at 18:36 UTC 65f83dc082ee6916188f8193f9a72acca008cea1
1 file changed +4 -39
t/t5505-remote.sh
+4 -39
@@ -110,16 +110,17 @@ test_expect_success 'remove remote' '
110 test_expect_success 'remove remote protects non-remote branches' '
111 (
112 cd test &&
113 - (cat >expect1 <<EOF
113 + { cat >expect1 <<EOF
114 Note: A non-remote branch was not removed; to delete it, use:
115 git branch -d master
116 EOF
117 - cat >expect2 <<EOF
117 + } &&
118 + { cat >expect2 <<EOF
119 Note: Non-remote branches were not removed; to delete them, use:
120 git branch -d foobranch
121 git branch -d master
122 EOF
122 -) &&
123 + } &&
124 git tag footag
125 git config --add remote.oops.fetch "+refs/*:refs/*" &&
126 git remote rm oops 2>actual1 &&
@@ -534,43 +535,34 @@ test_expect_success 'show empty remote' '
535 '
536
537 test_expect_success 'new remote' '
537 -(
538 git remote add someremote foo &&
539 echo foo >expect &&
540 git config --get-all remote.someremote.url >actual &&
541 cmp expect actual
542 -)
542 '
543
544 test_expect_success 'remote set-url bar' '
546 -(
545 git remote set-url someremote bar &&
546 echo bar >expect &&
547 git config --get-all remote.someremote.url >actual &&
548 cmp expect actual
551 -)
549 '
550
551 test_expect_success 'remote set-url baz bar' '
555 -(
552 git remote set-url someremote baz bar &&
553 echo baz >expect &&
554 git config --get-all remote.someremote.url >actual &&
555 cmp expect actual
560 -)
556 '
557
558 test_expect_success 'remote set-url zot bar' '
564 -(
559 test_must_fail git remote set-url someremote zot bar &&
560 echo baz >expect &&
561 git config --get-all remote.someremote.url >actual &&
562 cmp expect actual
569 -)
563 '
564
565 test_expect_success 'remote set-url --push zot baz' '
573 -(
566 test_must_fail git remote set-url --push someremote zot baz &&
567 echo "YYY" >expect &&
568 echo baz >>expect &&
@@ -578,11 +570,9 @@ test_expect_success 'remote set-url --push zot baz' '
570 echo "YYY" >>actual &&
571 git config --get-all remote.someremote.url >>actual &&
572 cmp expect actual
581 -)
573 '
574
575 test_expect_success 'remote set-url --push zot' '
585 -(
576 git remote set-url --push someremote zot &&
577 echo zot >expect &&
578 echo "YYY" >>expect &&
@@ -591,11 +581,9 @@ test_expect_success 'remote set-url --push zot' '
581 echo "YYY" >>actual &&
582 git config --get-all remote.someremote.url >>actual &&
583 cmp expect actual
594 -)
584 '
585
586 test_expect_success 'remote set-url --push qux zot' '
598 -(
587 git remote set-url --push someremote qux zot &&
588 echo qux >expect &&
589 echo "YYY" >>expect &&
@@ -604,11 +592,9 @@ test_expect_success 'remote set-url --push qux zot' '
592 echo "YYY" >>actual &&
593 git config --get-all remote.someremote.url >>actual &&
594 cmp expect actual
607 -)
595 '
596
597 test_expect_success 'remote set-url --push foo qu+x' '
611 -(
598 git remote set-url --push someremote foo qu+x &&
599 echo foo >expect &&
600 echo "YYY" >>expect &&
@@ -617,11 +603,9 @@ test_expect_success 'remote set-url --push foo qu+x' '
603 echo "YYY" >>actual &&
604 git config --get-all remote.someremote.url >>actual &&
605 cmp expect actual
620 -)
606 '
607
608 test_expect_success 'remote set-url --push --add aaa' '
624 -(
609 git remote set-url --push --add someremote aaa &&
610 echo foo >expect &&
611 echo aaa >>expect &&
@@ -631,11 +615,9 @@ test_expect_success 'remote set-url --push --add aaa' '
615 echo "YYY" >>actual &&
616 git config --get-all remote.someremote.url >>actual &&
617 cmp expect actual
634 -)
618 '
619
620 test_expect_success 'remote set-url --push bar aaa' '
638 -(
621 git remote set-url --push someremote bar aaa &&
622 echo foo >expect &&
623 echo bar >>expect &&
@@ -645,11 +627,9 @@ test_expect_success 'remote set-url --push bar aaa' '
627 echo "YYY" >>actual &&
628 git config --get-all remote.someremote.url >>actual &&
629 cmp expect actual
648 -)
630 '
631
632 test_expect_success 'remote set-url --push --delete bar' '
652 -(
633 git remote set-url --push --delete someremote bar &&
634 echo foo >expect &&
635 echo "YYY" >>expect &&
@@ -658,11 +638,9 @@ test_expect_success 'remote set-url --push --delete bar' '
638 echo "YYY" >>actual &&
639 git config --get-all remote.someremote.url >>actual &&
640 cmp expect actual
661 -)
641 '
642
643 test_expect_success 'remote set-url --push --delete foo' '
665 -(
644 git remote set-url --push --delete someremote foo &&
645 echo "YYY" >expect &&
646 echo baz >>expect &&
@@ -670,11 +648,9 @@ test_expect_success 'remote set-url --push --delete foo' '
648 echo "YYY" >>actual &&
649 git config --get-all remote.someremote.url >>actual &&
650 cmp expect actual
673 -)
651 '
652
653 test_expect_success 'remote set-url --add bbb' '
677 -(
654 git remote set-url --add someremote bbb &&
655 echo "YYY" >expect &&
656 echo baz >>expect &&
@@ -683,11 +659,9 @@ test_expect_success 'remote set-url --add bbb' '
659 echo "YYY" >>actual &&
660 git config --get-all remote.someremote.url >>actual &&
661 cmp expect actual
686 -)
662 '
663
664 test_expect_success 'remote set-url --delete .*' '
690 -(
665 test_must_fail git remote set-url --delete someremote .* &&
666 echo "YYY" >expect &&
667 echo baz >>expect &&
@@ -696,11 +670,9 @@ test_expect_success 'remote set-url --delete .*' '
670 echo "YYY" >>actual &&
671 git config --get-all remote.someremote.url >>actual &&
672 cmp expect actual
699 -)
673 '
674
675 test_expect_success 'remote set-url --delete bbb' '
703 -(
676 git remote set-url --delete someremote bbb &&
677 echo "YYY" >expect &&
678 echo baz >>expect &&
@@ -708,11 +680,9 @@ test_expect_success 'remote set-url --delete bbb' '
680 echo "YYY" >>actual &&
681 git config --get-all remote.someremote.url >>actual &&
682 cmp expect actual
711 -)
683 '
684
685 test_expect_success 'remote set-url --delete baz' '
715 -(
686 test_must_fail git remote set-url --delete someremote baz &&
687 echo "YYY" >expect &&
688 echo baz >>expect &&
@@ -720,11 +690,9 @@ test_expect_success 'remote set-url --delete baz' '
690 echo "YYY" >>actual &&
691 git config --get-all remote.someremote.url >>actual &&
692 cmp expect actual
723 -)
693 '
694
695 test_expect_success 'remote set-url --add ccc' '
727 -(
696 git remote set-url --add someremote ccc &&
697 echo "YYY" >expect &&
698 echo baz >>expect &&
@@ -733,11 +701,9 @@ test_expect_success 'remote set-url --add ccc' '
701 echo "YYY" >>actual &&
702 git config --get-all remote.someremote.url >>actual &&
703 cmp expect actual
736 -)
704 '
705
706 test_expect_success 'remote set-url --delete baz' '
740 -(
707 git remote set-url --delete someremote baz &&
708 echo "YYY" >expect &&
709 echo ccc >>expect &&
@@ -745,7 +711,6 @@ test_expect_success 'remote set-url --delete baz' '
711 echo "YYY" >>actual &&
712 git config --get-all remote.someremote.url >>actual &&
713 cmp expect actual
748 -)
714 '
715
716 test_done