From: Junio C Hamano Date: Sat, 3 Apr 2010 19:28:40 +0000 (-0700) Subject: Merge branch 'bc/t5505-fix' X-Git-Tag: v1.7.1-rc0~19 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/c2c6bcd3fa99cd446e15783473c958cee42a1543?ds=inline;hp=-c Merge branch 'bc/t5505-fix' * bc/t5505-fix: t/t5505-remote.sh: escape * to prevent interpretation by shell as glob t5505: add missing && t5505: remove unnecessary subshell invocations --- c2c6bcd3fa99cd446e15783473c958cee42a1543 diff --combined t/t5505-remote.sh index 2692050209,acfea06b81..230c0cd784 --- a/t/t5505-remote.sh +++ b/t/t5505-remote.sh @@@ -110,17 -110,18 +110,18 @@@ test_expect_success 'remove remote' test_expect_success 'remove remote protects non-remote branches' ' ( cd test && - (cat >expect1 <expect1 <expect2 <expect2 <actual1 && git branch foobranch && @@@ -507,15 -508,15 +508,15 @@@ test_expect_success 'remote prune to ca ( cd seven && git remote prune origin - ) 2>err && + ) >err 2>&1 && grep "has become dangling" err && - : And the dangling symref will not cause other annoying errors + : And the dangling symref will not cause other annoying errors && ( cd seven && git branch -a ) 2>err && - ! grep "points nowhere" err + ! grep "points nowhere" err && ( cd seven && test_must_fail git branch nomore origin @@@ -534,43 -535,34 +535,34 @@@ test_expect_success 'show empty remote ' test_expect_success 'new remote' ' - ( git remote add someremote foo && echo foo >expect && git config --get-all remote.someremote.url >actual && cmp expect actual - ) ' test_expect_success 'remote set-url bar' ' - ( git remote set-url someremote bar && echo bar >expect && git config --get-all remote.someremote.url >actual && cmp expect actual - ) ' test_expect_success 'remote set-url baz bar' ' - ( git remote set-url someremote baz bar && echo baz >expect && git config --get-all remote.someremote.url >actual && cmp expect actual - ) ' test_expect_success 'remote set-url zot bar' ' - ( test_must_fail git remote set-url someremote zot bar && echo baz >expect && git config --get-all remote.someremote.url >actual && cmp expect actual - ) ' test_expect_success 'remote set-url --push zot baz' ' - ( test_must_fail git remote set-url --push someremote zot baz && echo "YYY" >expect && echo baz >>expect && @@@ -578,11 -570,9 +570,9 @@@ echo "YYY" >>actual && git config --get-all remote.someremote.url >>actual && cmp expect actual - ) ' test_expect_success 'remote set-url --push zot' ' - ( git remote set-url --push someremote zot && echo zot >expect && echo "YYY" >>expect && @@@ -591,11 -581,9 +581,9 @@@ echo "YYY" >>actual && git config --get-all remote.someremote.url >>actual && cmp expect actual - ) ' test_expect_success 'remote set-url --push qux zot' ' - ( git remote set-url --push someremote qux zot && echo qux >expect && echo "YYY" >>expect && @@@ -604,11 -592,9 +592,9 @@@ echo "YYY" >>actual && git config --get-all remote.someremote.url >>actual && cmp expect actual - ) ' test_expect_success 'remote set-url --push foo qu+x' ' - ( git remote set-url --push someremote foo qu+x && echo foo >expect && echo "YYY" >>expect && @@@ -617,11 -603,9 +603,9 @@@ echo "YYY" >>actual && git config --get-all remote.someremote.url >>actual && cmp expect actual - ) ' test_expect_success 'remote set-url --push --add aaa' ' - ( git remote set-url --push --add someremote aaa && echo foo >expect && echo aaa >>expect && @@@ -631,11 -615,9 +615,9 @@@ echo "YYY" >>actual && git config --get-all remote.someremote.url >>actual && cmp expect actual - ) ' test_expect_success 'remote set-url --push bar aaa' ' - ( git remote set-url --push someremote bar aaa && echo foo >expect && echo bar >>expect && @@@ -645,11 -627,9 +627,9 @@@ echo "YYY" >>actual && git config --get-all remote.someremote.url >>actual && cmp expect actual - ) ' test_expect_success 'remote set-url --push --delete bar' ' - ( git remote set-url --push --delete someremote bar && echo foo >expect && echo "YYY" >>expect && @@@ -658,11 -638,9 +638,9 @@@ echo "YYY" >>actual && git config --get-all remote.someremote.url >>actual && cmp expect actual - ) ' test_expect_success 'remote set-url --push --delete foo' ' - ( git remote set-url --push --delete someremote foo && echo "YYY" >expect && echo baz >>expect && @@@ -670,11 -648,9 +648,9 @@@ echo "YYY" >>actual && git config --get-all remote.someremote.url >>actual && cmp expect actual - ) ' test_expect_success 'remote set-url --add bbb' ' - ( git remote set-url --add someremote bbb && echo "YYY" >expect && echo baz >>expect && @@@ -683,12 -659,10 +659,10 @@@ echo "YYY" >>actual && git config --get-all remote.someremote.url >>actual && cmp expect actual - ) ' test_expect_success 'remote set-url --delete .*' ' - ( - test_must_fail git remote set-url --delete someremote .* && + test_must_fail git remote set-url --delete someremote .\* && echo "YYY" >expect && echo baz >>expect && echo bbb >>expect && @@@ -696,11 -670,9 +670,9 @@@ echo "YYY" >>actual && git config --get-all remote.someremote.url >>actual && cmp expect actual - ) ' test_expect_success 'remote set-url --delete bbb' ' - ( git remote set-url --delete someremote bbb && echo "YYY" >expect && echo baz >>expect && @@@ -708,11 -680,9 +680,9 @@@ echo "YYY" >>actual && git config --get-all remote.someremote.url >>actual && cmp expect actual - ) ' test_expect_success 'remote set-url --delete baz' ' - ( test_must_fail git remote set-url --delete someremote baz && echo "YYY" >expect && echo baz >>expect && @@@ -720,11 -690,9 +690,9 @@@ echo "YYY" >>actual && git config --get-all remote.someremote.url >>actual && cmp expect actual - ) ' test_expect_success 'remote set-url --add ccc' ' - ( git remote set-url --add someremote ccc && echo "YYY" >expect && echo baz >>expect && @@@ -733,11 -701,9 +701,9 @@@ echo "YYY" >>actual && git config --get-all remote.someremote.url >>actual && cmp expect actual - ) ' test_expect_success 'remote set-url --delete baz' ' - ( git remote set-url --delete someremote baz && echo "YYY" >expect && echo ccc >>expect && @@@ -745,7 -711,6 +711,6 @@@ echo "YYY" >>actual && git config --get-all remote.someremote.url >>actual && cmp expect actual - ) ' test_done