{"thread":{"id":"23094","subject":"[PATCH 1/3] t5505: remove unnecessary subshell invocations","startedAt":"2010-03-19T23:36:34Z","lastAt":"2010-03-20T15:23:12Z","messageCount":5,"participants":["Brandon Casey","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"137282","messageId":"CxNG4R6Vr07DvPgqJe5msRW43WBM-kHscjWMfuzYM-XxJsVlLbOmNz_AdlMU4gEIvpsxQfdo7fc@cipher.nrlssc.navy.mil","threadId":"23094","inReplyTo":null,"subject":"[PATCH 1/3] t5505: remove unnecessary subshell invocations","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2010-03-19T23:36:34Z","receivedAt":"2010-03-19T23:36:34Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"From: Brandon Casey <drafnel@gmail.com>\n\n\nSigned-off-by: Brandon Casey <casey@nrlssc.navy.mil>\n---\n t/t5505-remote.sh |   43 ++++---------------------------------------\n 1 files changed, 4 insertions(+), 39 deletions(-)\n\ndiff --git a/t/t5505-remote.sh b/t/t5505-remote.sh\nindex a82c5ff..7291230 100755\n--- a/t/t5505-remote.sh\n+++ b/t/t5505-remote.sh\n@@ -110,16 +110,17 @@ test_expect_success 'remove remote' '\n test_expect_success 'remove remote protects non-remote branches' '\n (\n \tcd test &&\n-\t(cat >expect1 <<EOF\n+\t{ cat >expect1 <<EOF\n Note: A non-remote branch was not removed; to delete it, use:\n   git branch -d master\n EOF\n-    cat >expect2 <<EOF\n+\t} &&\n+\t{ cat >expect2 <<EOF\n Note: Non-remote branches were not removed; to delete them, use:\n   git branch -d foobranch\n   git branch -d master\n EOF\n-) &&\n+\t} &&\n \tgit tag footag\n \tgit config --add remote.oops.fetch \"+refs/*:refs/*\" &&\n \tgit remote rm oops 2>actual1 &&\n@@ -534,43 +535,34 @@ test_expect_success 'show empty remote' '\n '\n \n test_expect_success 'new remote' '\n-(\n \tgit remote add someremote foo &&\n \techo foo >expect &&\n \tgit config --get-all remote.someremote.url >actual &&\n \tcmp expect actual\n-)\n '\n \n test_expect_success 'remote set-url bar' '\n-(\n \tgit remote set-url someremote bar &&\n \techo bar >expect &&\n \tgit config --get-all remote.someremote.url >actual &&\n \tcmp expect actual\n-)\n '\n \n test_expect_success 'remote set-url baz bar' '\n-(\n \tgit remote set-url someremote baz bar &&\n \techo baz >expect &&\n \tgit config --get-all remote.someremote.url >actual &&\n \tcmp expect actual\n-)\n '\n \n test_expect_success 'remote set-url zot bar' '\n-(\n \ttest_must_fail git remote set-url someremote zot bar &&\n \techo baz >expect &&\n \tgit config --get-all remote.someremote.url >actual &&\n \tcmp expect actual\n-)\n '\n \n test_expect_success 'remote set-url --push zot baz' '\n-(\n \ttest_must_fail git remote set-url --push someremote zot baz &&\n \techo \"YYY\" >expect &&\n \techo baz >>expect &&\n@@ -578,11 +570,9 @@ test_expect_success 'remote set-url --push zot baz' '\n \techo \"YYY\" >>actual &&\n \tgit config --get-all remote.someremote.url >>actual &&\n \tcmp expect actual\n-)\n '\n \n test_expect_success 'remote set-url --push zot' '\n-(\n \tgit remote set-url --push someremote zot &&\n \techo zot >expect &&\n \techo \"YYY\" >>expect &&\n@@ -591,11 +581,9 @@ test_expect_success 'remote set-url --push zot' '\n \techo \"YYY\" >>actual &&\n \tgit config --get-all remote.someremote.url >>actual &&\n \tcmp expect actual\n-)\n '\n \n test_expect_success 'remote set-url --push qux zot' '\n-(\n \tgit remote set-url --push someremote qux zot &&\n \techo qux >expect &&\n \techo \"YYY\" >>expect &&\n@@ -604,11 +592,9 @@ test_expect_success 'remote set-url --push qux zot' '\n \techo \"YYY\" >>actual &&\n \tgit config --get-all remote.someremote.url >>actual &&\n \tcmp expect actual\n-)\n '\n \n test_expect_success 'remote set-url --push foo qu+x' '\n-(\n \tgit remote set-url --push someremote foo qu+x &&\n \techo foo >expect &&\n \techo \"YYY\" >>expect &&\n@@ -617,11 +603,9 @@ test_expect_success 'remote set-url --push foo qu+x' '\n \techo \"YYY\" >>actual &&\n \tgit config --get-all remote.someremote.url >>actual &&\n \tcmp expect actual\n-)\n '\n \n test_expect_success 'remote set-url --push --add aaa' '\n-(\n \tgit remote set-url --push --add someremote aaa &&\n \techo foo >expect &&\n \techo aaa >>expect &&\n@@ -631,11 +615,9 @@ test_expect_success 'remote set-url --push --add aaa' '\n \techo \"YYY\" >>actual &&\n \tgit config --get-all remote.someremote.url >>actual &&\n \tcmp expect actual\n-)\n '\n \n test_expect_success 'remote set-url --push bar aaa' '\n-(\n \tgit remote set-url --push someremote bar aaa &&\n \techo foo >expect &&\n \techo bar >>expect &&\n@@ -645,11 +627,9 @@ test_expect_success 'remote set-url --push bar aaa' '\n \techo \"YYY\" >>actual &&\n \tgit config --get-all remote.someremote.url >>actual &&\n \tcmp expect actual\n-)\n '\n \n test_expect_success 'remote set-url --push --delete bar' '\n-(\n \tgit remote set-url --push --delete someremote bar &&\n \techo foo >expect &&\n \techo \"YYY\" >>expect &&\n@@ -658,11 +638,9 @@ test_expect_success 'remote set-url --push --delete bar' '\n \techo \"YYY\" >>actual &&\n \tgit config --get-all remote.someremote.url >>actual &&\n \tcmp expect actual\n-)\n '\n \n test_expect_success 'remote set-url --push --delete foo' '\n-(\n \tgit remote set-url --push --delete someremote foo &&\n \techo \"YYY\" >expect &&\n \techo baz >>expect &&\n@@ -670,11 +648,9 @@ test_expect_success 'remote set-url --push --delete foo' '\n \techo \"YYY\" >>actual &&\n \tgit config --get-all remote.someremote.url >>actual &&\n \tcmp expect actual\n-)\n '\n \n test_expect_success 'remote set-url --add bbb' '\n-(\n \tgit remote set-url --add someremote bbb &&\n \techo \"YYY\" >expect &&\n \techo baz >>expect &&\n@@ -683,11 +659,9 @@ test_expect_success 'remote set-url --add bbb' '\n \techo \"YYY\" >>actual &&\n \tgit config --get-all remote.someremote.url >>actual &&\n \tcmp expect actual\n-)\n '\n \n test_expect_success 'remote set-url --delete .*' '\n-(\n \ttest_must_fail git remote set-url --delete someremote .* &&\n \techo \"YYY\" >expect &&\n \techo baz >>expect &&\n@@ -696,11 +670,9 @@ test_expect_success 'remote set-url --delete .*' '\n \techo \"YYY\" >>actual &&\n \tgit config --get-all remote.someremote.url >>actual &&\n \tcmp expect actual\n-)\n '\n \n test_expect_success 'remote set-url --delete bbb' '\n-(\n \tgit remote set-url --delete someremote bbb &&\n \techo \"YYY\" >expect &&\n \techo baz >>expect &&\n@@ -708,11 +680,9 @@ test_expect_success 'remote set-url --delete bbb' '\n \techo \"YYY\" >>actual &&\n \tgit config --get-all remote.someremote.url >>actual &&\n \tcmp expect actual\n-)\n '\n \n test_expect_success 'remote set-url --delete baz' '\n-(\n \ttest_must_fail git remote set-url --delete someremote baz &&\n \techo \"YYY\" >expect &&\n \techo baz >>expect &&\n@@ -720,11 +690,9 @@ test_expect_success 'remote set-url --delete baz' '\n \techo \"YYY\" >>actual &&\n \tgit config --get-all remote.someremote.url >>actual &&\n \tcmp expect actual\n-)\n '\n \n test_expect_success 'remote set-url --add ccc' '\n-(\n \tgit remote set-url --add someremote ccc &&\n \techo \"YYY\" >expect &&\n \techo baz >>expect &&\n@@ -733,11 +701,9 @@ test_expect_success 'remote set-url --add ccc' '\n \techo \"YYY\" >>actual &&\n \tgit config --get-all remote.someremote.url >>actual &&\n \tcmp expect actual\n-)\n '\n \n test_expect_success 'remote set-url --delete baz' '\n-(\n \tgit remote set-url --delete someremote baz &&\n \techo \"YYY\" >expect &&\n \techo ccc >>expect &&\n@@ -745,7 +711,6 @@ test_expect_success 'remote set-url --delete baz' '\n \techo \"YYY\" >>actual &&\n \tgit config --get-all remote.someremote.url >>actual &&\n \tcmp expect actual\n-)\n '\n \n test_done\n-- \n1.6.6.2\n"},{"id":"137283","messageId":"CxNG4R6Vr07DvPgqJe5msbiN0-7URObSdLhedqTJLYFpvj_BbRYts-mzQj8AH3AhwPzM5USx71g@cipher.nrlssc.navy.mil","threadId":"23094","inReplyTo":"CxNG4R6Vr07DvPgqJe5msRW43WBM-kHscjWMfuzYM-XxJsVlLbOmNz_AdlMU4gEIvpsxQfdo7fc@cipher.nrlssc.navy.mil","subject":"[PATCH 2/3] t5505: add missing &&","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2010-03-19T23:36:35Z","receivedAt":"2010-03-19T23:36:35Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"From: Brandon Casey <drafnel@gmail.com>\n\n\nSigned-off-by: Brandon Casey <casey@nrlssc.navy.mil>\n---\n t/t5505-remote.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/t/t5505-remote.sh b/t/t5505-remote.sh\nindex 7291230..e7afe9e 100755\n--- a/t/t5505-remote.sh\n+++ b/t/t5505-remote.sh\n@@ -121,7 +121,7 @@ Note: Non-remote branches were not removed; to delete them, use:\n   git branch -d master\n EOF\n \t} &&\n-\tgit tag footag\n+\tgit tag footag &&\n \tgit config --add remote.oops.fetch \"+refs/*:refs/*\" &&\n \tgit remote rm oops 2>actual1 &&\n \tgit branch foobranch &&\n-- \n1.6.6.2\n"},{"id":"137288","messageId":"CxNG4R6Vr07DvPgqJe5msXiOdQxDJcRUCjzNf-LPJNy2ozwVv3sxeG9yEQRNflvd8iDQ_qNtsIU@cipher.nrlssc.navy.mil","threadId":"23094","inReplyTo":"CxNG4R6Vr07DvPgqJe5msRW43WBM-kHscjWMfuzYM-XxJsVlLbOmNz_AdlMU4gEIvpsxQfdo7fc@cipher.nrlssc.navy.mil","subject":"[PATCH 3/3] t/t5505-remote.sh: escape * to prevent interpretation by shell as glob","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2010-03-19T23:36:36Z","receivedAt":"2010-03-19T23:36:36Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"From: Brandon Casey <drafnel@gmail.com>\n\nThis test is supposed to check that git-remote correctly refuses to delete\nall non-push URLS when the all-encompassing '.*' regular expression is given.\nSince the '*' was not protected, it was interpreted by the shell as a file\nglob and expanded before being passed to git-remote.  The call to\ngit-remote still exited non-zero in this case, and the overall test still\npassed, but it exited non-zero because git-remote was passed the incorrect\nnumber of arguments, not for the reason it was supposed to fail.\n\nCorrect the test by escaping the '*'.\n\nSigned-off-by: Brandon Casey <casey@nrlssc.navy.mil>\n---\n t/t5505-remote.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/t/t5505-remote.sh b/t/t5505-remote.sh\nindex e7afe9e..acfea06 100755\n--- a/t/t5505-remote.sh\n+++ b/t/t5505-remote.sh\n@@ -662,7 +662,7 @@ test_expect_success 'remote set-url --add bbb' '\n '\n \n test_expect_success 'remote set-url --delete .*' '\n-\ttest_must_fail git remote set-url --delete someremote .* &&\n+\ttest_must_fail git remote set-url --delete someremote .\\* &&\n \techo \"YYY\" >expect &&\n \techo baz >>expect &&\n \techo bbb >>expect &&\n-- \n1.6.6.2\n"},{"id":"137290","messageId":"bpVNzWf2wr6FTgNS3ckeC63TJuoZPSe1-UW05J-nQIW6zoMM-wtBYuL5L8itveO523UwTqQt1bg@cipher.nrlssc.navy.mil","threadId":"23094","inReplyTo":"CxNG4R6Vr07DvPgqJe5msbiN0-7URObSdLhedqTJLYFpvj_BbRYts-mzQj8AH3AhwPzM5USx71g@cipher.nrlssc.navy.mil","subject":"[PATCH 3/3 resend] t/t5505-remote.sh: escape * to prevent interpretation by shell as glob","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2010-03-20T00:10:20Z","receivedAt":"2010-03-20T00:10:20Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"From: Brandon Casey <drafnel@gmail.com>\n\nThis test is supposed to check that git-remote correctly refuses to delete\nall URLS for the specified remote which match the '.*' regular expression.\nSince the '*' was not protected, it was interpreted by the shell as a file\nglob and expanded before being passed to git-remote.  The call to\ngit-remote still exited non-zero in this case, and the overall test still\npassed, but it exited non-zero because git-remote was passed the incorrect\nnumber of arguments, not for the reason it was supposed to fail.\n\nCorrect the test by escaping the '*'.\n\nSigned-off-by: Brandon Casey <casey@nrlssc.navy.mil>\n---\n\n\nWell, since I don't know if the origin 3/3 was lost or whether I\naccidentally hit 'n' when git-send-email prompted me for whether to send\nit, here it is again.\n\n-brandon\n\n\n t/t5505-remote.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/t/t5505-remote.sh b/t/t5505-remote.sh\nindex e7afe9e..acfea06 100755\n--- a/t/t5505-remote.sh\n+++ b/t/t5505-remote.sh\n@@ -662,7 +662,7 @@ test_expect_success 'remote set-url --add bbb' '\n '\n \n test_expect_success 'remote set-url --delete .*' '\n-\ttest_must_fail git remote set-url --delete someremote .* &&\n+\ttest_must_fail git remote set-url --delete someremote .\\* &&\n \techo \"YYY\" >expect &&\n \techo baz >>expect &&\n \techo bbb >>expect &&\n-- \n1.6.6.2\n"},{"id":"137338","messageId":"7viq8row4f.fsf@alter.siamese.dyndns.org","threadId":"23094","inReplyTo":"CxNG4R6Vr07DvPgqJe5msXiOdQxDJcRUCjzNf-LPJNy2ozwVv3sxeG9yEQRNflvd8iDQ_qNtsIU@cipher.nrlssc.navy.mil","subject":"Re: [PATCH 3/3] t/t5505-remote.sh: escape * to prevent interpretation by shell as glob","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-03-20T15:23:12Z","receivedAt":"2010-03-20T15:23:12Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thanks.\n"}]}