{"thread":{"id":"24447","subject":"[PATCH] t/{t5541,lib-httpd}: replace problematic '!()' notation with test_must_fail","startedAt":"2010-07-20T18:27:55Z","lastAt":"2010-07-20T18:38:16Z","messageCount":2,"participants":["Brandon Casey","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"145883","messageId":"a6Z8194aVj9d_uiPj0QZaVCfPhZWVDzj2NuBws8RYnYVr4pe9tF4BSy7a4J8g7UAxPIvHfvIwT8@cipher.nrlssc.navy.mil","threadId":"24447","inReplyTo":null,"subject":"[PATCH] t/{t5541,lib-httpd}: replace problematic '!()' notation with test_must_fail","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2010-07-20T18:27:55Z","receivedAt":"2010-07-20T18:27:55Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"From: Brandon Casey <drafnel@gmail.com>\n\nThe '!()' notation is interpreted as a pattern-list on Ksh.  The Ksh man\npage describe it as follows:\n\n   !(pattern-list)\n      Matches anything except one of the given patterns.\n\nKsh performs a file glob using the pattern-list and then tries to execute\nthe first file in the list.  If a space is added between the '!' and the\nopen parens, then Ksh will not interpret it as a pattern list, but in this\ncase, it is preferred to use test_must_fail, so lets do so.\n\nSigned-off-by: Brandon Casey <casey@nrlssc.navy.mil>\n---\n t/lib-httpd.sh       |    2 +-\n t/t5541-http-push.sh |    2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/t/lib-httpd.sh b/t/lib-httpd.sh\nindex 71effc5..e733f65 100644\n--- a/t/lib-httpd.sh\n+++ b/t/lib-httpd.sh\n@@ -145,7 +145,7 @@ test_http_push_nonff() {\n \t\techo \"changed\" > path2 &&\n \t\tgit commit -a -m path2 --amend &&\n \n-\t\t!(git push -v origin >output 2>&1) &&\n+\t\ttest_must_fail git push -v origin >output 2>&1 &&\n \t\t(cd \"$REMOTE_REPO\" &&\n \t\t test $HEAD = $(git rev-parse --verify HEAD))\n \t'\ndiff --git a/t/t5541-http-push.sh b/t/t5541-http-push.sh\nindex 504884b..b0c2a2c 100755\n--- a/t/t5541-http-push.sh\n+++ b/t/t5541-http-push.sh\n@@ -128,7 +128,7 @@ test_expect_success 'push fails for non-fast-forward refs unmatched by remote he\n \n \t# push master too; this ensures there is at least one '\"'push'\"' command to\n \t# the remote helper and triggers interaction with the helper.\n-\t!(git push -v origin +master master:retsam >output 2>&1) &&\n+\ttest_must_fail git push -v origin +master master:retsam >output 2>&1 &&\n \n \tgrep \"^ + [a-f0-9]*\\.\\.\\.[a-f0-9]* *master -> master (forced update)$\" output &&\n \tgrep \"^ ! \\[rejected\\] *master -> retsam (non-fast-forward)$\" output &&\n-- \n1.6.6.2\n"},{"id":"145885","messageId":"7vwrsqknhj.fsf@alter.siamese.dyndns.org","threadId":"24447","inReplyTo":"a6Z8194aVj9d_uiPj0QZaVCfPhZWVDzj2NuBws8RYnYVr4pe9tF4BSy7a4J8g7UAxPIvHfvIwT8@cipher.nrlssc.navy.mil","subject":"Re: [PATCH] t/{t5541,lib-httpd}: replace problematic '!()' notation with test_must_fail","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-07-20T18:38:16Z","receivedAt":"2010-07-20T18:38:16Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Brandon Casey <casey@nrlssc.navy.mil> writes:\n\n> From: Brandon Casey <drafnel@gmail.com>\n>\n> The '!()' notation is interpreted as a pattern-list on Ksh.\n\nThanks.\n"}]}