{"thread":{"id":"10140","subject":"[PATCH] t5403-post-checkout-hook.sh: don't use \"==\" as test operator","startedAt":"2007-10-04T16:40:42Z","lastAt":"2007-10-04T16:40:42Z","messageCount":1,"participants":["René Scharfe"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"54853","messageId":"4705178A.5000905@lsrfire.ath.cx","threadId":"10140","inReplyTo":null,"subject":"[PATCH] t5403-post-checkout-hook.sh: don't use \"==\" as test operator","fromName":"René Scharfe","fromEmail":"rene.scharfe@lsrfire.ath.cx","sentAt":"2007-10-04T16:40:42Z","receivedAt":"2007-10-04T16:40:42Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"The POSIXly correct comparison operator of test is \"=\", not \"==\"; the\nlatter is a GNU invention.  Without this patch the script fails (at\nleast) on Ubuntu 7.04, where /bin/sh is not bash.\n\nSigned-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>\n\ndiff --git a/t/t5403-post-checkout-hook.sh b/t/t5403-post-checkout-hook.sh\nindex 487abf3..823239a 100755\n--- a/t/t5403-post-checkout-hook.sh\n+++ b/t/t5403-post-checkout-hook.sh\n@@ -39,7 +39,7 @@ test_expect_success 'post-checkout receives the right arguments with HEAD unchan\n         old=$(awk \"{print \\$1}\" clone1/.git/post-checkout.args) &&\n         new=$(awk \"{print \\$2}\" clone1/.git/post-checkout.args) &&\n         flag=$(awk \"{print \\$3}\" clone1/.git/post-checkout.args) &&\n-        test $old = $new -a $flag == 1\n+        test $old = $new -a $flag = 1\n '\n \n test_expect_success 'post-checkout runs as expected ' '\n@@ -52,7 +52,7 @@ test_expect_success 'post-checkout args are correct with git checkout -b ' '\n         old=$(awk \"{print \\$1}\" clone1/.git/post-checkout.args) &&\n         new=$(awk \"{print \\$2}\" clone1/.git/post-checkout.args) &&\n         flag=$(awk \"{print \\$3}\" clone1/.git/post-checkout.args) &&\n-        test $old = $new -a $flag == 1\n+        test $old = $new -a $flag = 1\n '\n \n test_expect_success 'post-checkout receives the right args with HEAD changed ' '\n@@ -60,7 +60,7 @@ test_expect_success 'post-checkout receives the right args with HEAD changed ' '\n         old=$(awk \"{print \\$1}\" clone2/.git/post-checkout.args) &&\n         new=$(awk \"{print \\$2}\" clone2/.git/post-checkout.args) &&\n         flag=$(awk \"{print \\$3}\" clone2/.git/post-checkout.args) &&\n-        test $old != $new -a $flag == 1\n+        test $old != $new -a $flag = 1\n '\n \n test_expect_success 'post-checkout receives the right args when not switching branches ' '\n@@ -68,7 +68,7 @@ test_expect_success 'post-checkout receives the right args when not switching br\n         old=$(awk \"{print \\$1}\" clone2/.git/post-checkout.args) &&\n         new=$(awk \"{print \\$2}\" clone2/.git/post-checkout.args) &&\n         flag=$(awk \"{print \\$3}\" clone2/.git/post-checkout.args) &&\n-        test $old == $new -a $flag == 0\n+        test $old = $new -a $flag = 0\n '\n \n test_done\n"}]}