{"thread":{"id":"29811","subject":"[PATCH] tests: fix spurious error when run directly with Solaris /usr/xpg4/bin/sh","startedAt":"2012-03-02T10:33:53Z","lastAt":"2012-03-02T22:41:14Z","messageCount":4,"participants":["Stefano Lattarini","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"185900","messageId":"f3294212cbaf9bc0d6446d2cdf13619d0317b9e4.1330684369.git.stefano.lattarini@gmail.com","threadId":"29811","inReplyTo":null,"subject":"[PATCH] tests: fix spurious error when run directly with Solaris /usr/xpg4/bin/sh","fromName":"Stefano Lattarini","fromEmail":"stefano.lattarini@gmail.com","sentAt":"2012-03-02T10:33:53Z","receivedAt":"2012-03-02T10:33:53Z","isPatch":true,"sender":{"key":"stefano.lattarini@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1429199?v=4"},"body":"If any test script is run directly with Solaris 10 /usr/xpg4/bin/sh or\n/bin/ksh, it fails spuriously with a message like:\n\n  t0000-basic.sh[31]: unset: bad argument count\n\nThis happens because those shells bail out when encountering a call to\n\"unset\" with no arguments, and such unset call could take place in\n'test-lib.sh'.  Fix that issue, and add a proper comment to ensure we\ndon't regress in this respect.\n---\n t/test-lib.sh |    9 +++++----\n 1 files changed, 5 insertions(+), 4 deletions(-)\n\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex a089a18..c0d04c4 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -42,10 +42,11 @@ TZ=UTC\n TERM=dumb\n export LANG LC_ALL PAGER TERM TZ\n EDITOR=:\n-unset VISUAL\n-unset EMAIL\n-unset LANGUAGE\n-unset $(perl -e '\n+# A call to \"unset\" with no arguments causes at least Solaris 10\n+# /usr/xpg4/bin/sh and /bin/ksh to bail out.  So keep the unsets\n+# deriving from the command substitution clustered with the other\n+# ones.\n+unset VISUAL EMAIL LANGUAGE $(perl -e '\n \tmy @env = keys %ENV;\n \tmy $ok = join(\"|\", qw(\n \t\tTRACE\n-- \n1.7.9\n"},{"id":"185936","messageId":"7vd38uetls.fsf@alter.siamese.dyndns.org","threadId":"29811","inReplyTo":"f3294212cbaf9bc0d6446d2cdf13619d0317b9e4.1330684369.git.stefano.lattarini@gmail.com","subject":"Re: [PATCH] tests: fix spurious error when run directly with Solaris /usr/xpg4/bin/sh","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-03-02T18:38:23Z","receivedAt":"2012-03-02T18:38:23Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"This patch looks good, but please sign-off.\n"},{"id":"185938","messageId":"f2243a179ce49eed668341a6c0e3a452bf7ae79f.1330713761.git.stefano.lattarini@gmail.com","threadId":"29811","inReplyTo":"7vd38uetls.fsf@alter.siamese.dyndns.org","subject":"[PATCH v2] tests: fix spurious error when run directly with Solaris /usr/xpg4/bin/sh","fromName":"Stefano Lattarini","fromEmail":"stefano.lattarini@gmail.com","sentAt":"2012-03-02T18:48:36Z","receivedAt":"2012-03-02T18:48:36Z","isPatch":true,"sender":{"key":"stefano.lattarini@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1429199?v=4"},"body":"If any test script is run directly with Solaris 10 /usr/xpg4/bin/sh or\n/bin/ksh, it fails spuriously with a message like:\n\n  t0000-basic.sh[31]: unset: bad argument count\n\nThis happens because those shells bail out when encountering a call to\n\"unset\" with no arguments, and such unset call could take place in\n'test-lib.sh'.  Fix that issue, and add a proper comment to ensure we\ndon't regress in this respect.\n\nSigned-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>\n---\n\n Changes from the previous version: add a proper \"Signed-off-by\" line,\n which I had forgotten in the previous version.  Sorry for the confusion.\n\n t/test-lib.sh |    9 +++++----\n 1 files changed, 5 insertions(+), 4 deletions(-)\n\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex a089a18..c0d04c4 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -42,10 +42,11 @@ TZ=UTC\n TERM=dumb\n export LANG LC_ALL PAGER TERM TZ\n EDITOR=:\n-unset VISUAL\n-unset EMAIL\n-unset LANGUAGE\n-unset $(perl -e '\n+# A call to \"unset\" with no arguments causes at least Solaris 10\n+# /usr/xpg4/bin/sh and /bin/ksh to bail out.  So keep the unsets\n+# deriving from the command substitution clustered with the other\n+# ones.\n+unset VISUAL EMAIL LANGUAGE $(perl -e '\n \tmy @env = keys %ENV;\n \tmy $ok = join(\"|\", qw(\n \t\tTRACE\n-- \n1.7.9\n"},{"id":"185950","messageId":"7v62embp85.fsf@alter.siamese.dyndns.org","threadId":"29811","inReplyTo":"f2243a179ce49eed668341a6c0e3a452bf7ae79f.1330713761.git.stefano.lattarini@gmail.com","subject":"Re: [PATCH v2] tests: fix spurious error when run directly with Solaris /usr/xpg4/bin/sh","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-03-02T22:41:14Z","receivedAt":"2012-03-02T22:41:14Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thanks.\n"}]}