{"thread":{"id":"32054","subject":"t5801-remote-helpers.sh fails","startedAt":"2012-11-10T13:48:23Z","lastAt":"2012-11-18T15:52:27Z","messageCount":7,"participants":["Torsten Bögershausen","Felipe Contreras"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"202752","messageId":"509E5B27.5080808@web.de","threadId":"32054","inReplyTo":null,"subject":"t5801-remote-helpers.sh fails","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2012-11-10T13:48:23Z","receivedAt":"2012-11-10T13:48:23Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"Hej,\non peff/pu t5801 fails, the error is in git-remote-testgit, please see below.\n\nThat's on my Mac OS X box.\n\nI haven't digged further into the test case, but it looks as if \n\"[-+]A \tmake NAMEs associative arrays\"\nis not supported on this version of bash.\n/Torsten\n\n\n/Users/tb/projects/git/git.peff/git-remote-testgit: line 64: declare: -A: invalid option\ndeclare: usage: declare [-afFirtx] [-p] [name[=value] ...]\n/Users/tb/projects/git/git.peff/git-remote-testgit: line 66: refs/heads/master: division by 0 (error token is \"/master\")\nerror: fast-export died of signal 13\nfatal: Error while running fast-export\n"},{"id":"202772","messageId":"CAMP44s0HtMRaQ91z95cZS73W7tnqYwyKV_2guWJ6u6UP4p5JNw@mail.gmail.com","threadId":"32054","inReplyTo":"509E5B27.5080808@web.de","subject":"Re: t5801-remote-helpers.sh fails","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2012-11-10T19:15:00Z","receivedAt":"2012-11-10T19:15:00Z","isPatch":false,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Hi,\n\nOn Sat, Nov 10, 2012 at 2:48 PM, Torsten Bögershausen <tboegi@web.de> wrote:\n\n> on peff/pu t5801 fails, the error is in git-remote-testgit, please see below.\n>\n> That's on my Mac OS X box.\n>\n> I haven't digged further into the test case, but it looks as if\n> \"[-+]A  make NAMEs associative arrays\"\n> is not supported on this version of bash.\n> /Torsten\n>\n>\n> /Users/tb/projects/git/git.peff/git-remote-testgit: line 64: declare: -A: invalid option\n> declare: usage: declare [-afFirtx] [-p] [name[=value] ...]\n> /Users/tb/projects/git/git.peff/git-remote-testgit: line 66: refs/heads/master: division by 0 (error token is \"/master\")\n> error: fast-export died of signal 13\n> fatal: Error while running fast-export\n\nWhat is your bash --version?\n\n-- \nFelipe Contreras\n"},{"id":"202774","messageId":"509EA8EE.1030908@web.de","threadId":"32054","inReplyTo":"CAMP44s0HtMRaQ91z95cZS73W7tnqYwyKV_2guWJ6u6UP4p5JNw@mail.gmail.com","subject":"Re: t5801-remote-helpers.sh fails","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2012-11-10T19:20:14Z","receivedAt":"2012-11-10T19:20:14Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 11/10/2012 08:15 PM, Felipe Contreras wrote:\n> Hi,\n>\n> On Sat, Nov 10, 2012 at 2:48 PM, Torsten Bögershausen <tboegi@web.de> wrote:\n>\n>> on peff/pu t5801 fails, the error is in git-remote-testgit, please see below.\n>>\n>> That's on my Mac OS X box.\n>>\n>> I haven't digged further into the test case, but it looks as if\n>> \"[-+]A  make NAMEs associative arrays\"\n>> is not supported on this version of bash.\n>> /Torsten\n>>\n>>\n>> /Users/tb/projects/git/git.peff/git-remote-testgit: line 64: declare: -A: invalid option\n>> declare: usage: declare [-afFirtx] [-p] [name[=value] ...]\n>> /Users/tb/projects/git/git.peff/git-remote-testgit: line 66: refs/heads/master: division by 0 (error token is \"/master\")\n>> error: fast-export died of signal 13\n>> fatal: Error while running fast-export\n>\n> What is your bash --version?\n>\n  bash --version\nGNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0)\nCopyright (C) 2007 Free Software Foundation, Inc.\n\nOn the other hand, Documentation/CodingGuidelines says:\n   - No shell arrays.\n\nCould we use perl to have arrays?\n\n/Torsten\n"},{"id":"202786","messageId":"CAMP44s2yenQKSgdUXfZP+yDJJ+bdveyms=SQ+3ptPvpT6D0hsg@mail.gmail.com","threadId":"32054","inReplyTo":"509EA8EE.1030908@web.de","subject":"Re: t5801-remote-helpers.sh fails","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2012-11-10T22:05:20Z","receivedAt":"2012-11-10T22:05:20Z","isPatch":false,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Sat, Nov 10, 2012 at 8:20 PM, Torsten Bögershausen <tboegi@web.de> wrote:\n> On 11/10/2012 08:15 PM, Felipe Contreras wrote:\n>>\n>> Hi,\n>>\n>> On Sat, Nov 10, 2012 at 2:48 PM, Torsten Bögershausen <tboegi@web.de>\n>> wrote:\n>>\n>>> on peff/pu t5801 fails, the error is in git-remote-testgit, please see\n>>> below.\n>>>\n>>> That's on my Mac OS X box.\n>>>\n>>> I haven't digged further into the test case, but it looks as if\n>>> \"[-+]A  make NAMEs associative arrays\"\n>>> is not supported on this version of bash.\n>>> /Torsten\n>>>\n>>>\n>>> /Users/tb/projects/git/git.peff/git-remote-testgit: line 64: declare: -A:\n>>> invalid option\n>>> declare: usage: declare [-afFirtx] [-p] [name[=value] ...]\n>>> /Users/tb/projects/git/git.peff/git-remote-testgit: line 66:\n>>> refs/heads/master: division by 0 (error token is \"/master\")\n>>> error: fast-export died of signal 13\n>>> fatal: Error while running fast-export\n>>\n>>\n>> What is your bash --version?\n>>\n>  bash --version\n> GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0)\n> Copyright (C) 2007 Free Software Foundation, Inc.\n\nI see, that version indeed doesn't have associative arrays.\n\n> On the other hand, Documentation/CodingGuidelines says:\n>   - No shell arrays.\n\nYeah, for shell code I guess, but this is bash code.\n\n> Could we use perl to have arrays?\n\nI think the code in perl would be harder to follow, and this is meant\nnot only as a test, but also as a reference.\n\nI'm not exactly sure what we should do here:\n\na) remove the code (would not be so good as a reference)\nb) enable the code conditionally based on the version of bash (harder to read)\nc) replace the code without associative arrays (will be much more\ncomplicated and ugly)\nd) add a check for the bash version to the top of the test in t/\n\nI'm leaning towards d), followed by b).\n\nIf only there was a clean way to do this, so c) would not be so ugly.\n\nAfter investigating different optins this seems to be the best:\n\n\tjoin -e empty -o '0 1.2 2.2' -a 2 <(echo \"$before\") <(echo \"$after\")\n| while read e a b; do\n\t\ttest \"$a\" == \"$b\" && continue\n\t\techo \"changed $e\"\n\tdone\n\nBut to me seems a bit harder to grasp. Not sure.\n\nCheers.\n\n-- \nFelipe Contreras\n"},{"id":"203452","messageId":"50A87718.4030806@web.de","threadId":"32054","inReplyTo":"CAMP44s2yenQKSgdUXfZP+yDJJ+bdveyms=SQ+3ptPvpT6D0hsg@mail.gmail.com","subject":"Re: t5801-remote-helpers.sh fails","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2012-11-18T05:50:16Z","receivedAt":"2012-11-18T05:50:16Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 10.11.12 23:05, Felipe Contreras wrote:\n> On Sat, Nov 10, 2012 at 8:20 PM, Torsten Bögershausen <tboegi@web.de> wrote:\n>> On 11/10/2012 08:15 PM, Felipe Contreras wrote:\n>>>\n>>> Hi,\n>>>\n>>> On Sat, Nov 10, 2012 at 2:48 PM, Torsten Bögershausen <tboegi@web.de>\n>>> wrote:\n>>>\n>>>> on peff/pu t5801 fails, the error is in git-remote-testgit, please see\n>>>> below.\n>>>>\n>>>> That's on my Mac OS X box.\n>>>>\n>>>> I haven't digged further into the test case, but it looks as if\n>>>> \"[-+]A  make NAMEs associative arrays\"\n>>>> is not supported on this version of bash.\n>>>> /Torsten\n>>>>\n>>>>\n>>>> /Users/tb/projects/git/git.peff/git-remote-testgit: line 64: declare: -A:\n>>>> invalid option\n>>>> declare: usage: declare [-afFirtx] [-p] [name[=value] ...]\n>>>> /Users/tb/projects/git/git.peff/git-remote-testgit: line 66:\n>>>> refs/heads/master: division by 0 (error token is \"/master\")\n>>>> error: fast-export died of signal 13\n>>>> fatal: Error while running fast-export\n>>>\n>>>\n>>> What is your bash --version?\n>>>\n>>  bash --version\n>> GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0)\n>> Copyright (C) 2007 Free Software Foundation, Inc.\n> \n> I see, that version indeed doesn't have associative arrays.\n> \n>> On the other hand, Documentation/CodingGuidelines says:\n>>   - No shell arrays.\n> \n> Yeah, for shell code I guess, but this is bash code.\n> \n>> Could we use perl to have arrays?\n> \n> I think the code in perl would be harder to follow, and this is meant\n> not only as a test, but also as a reference.\n> \n> I'm not exactly sure what we should do here:\n> \n> a) remove the code (would not be so good as a reference)\n> b) enable the code conditionally based on the version of bash (harder to read)\n> c) replace the code without associative arrays (will be much more\n> complicated and ugly)\n> d) add a check for the bash version to the top of the test in t/\n> \n> I'm leaning towards d), followed by b).\n> \n> If only there was a clean way to do this, so c) would not be so ugly.\n> \n> After investigating different optins this seems to be the best:\n> \n> \tjoin -e empty -o '0 1.2 2.2' -a 2 <(echo \"$before\") <(echo \"$after\")\n> | while read e a b; do\n> \t\ttest \"$a\" == \"$b\" && continue\n> \t\techo \"changed $e\"\n> \tdone\n> \n> But to me seems a bit harder to grasp. Not sure.\n> \n> Cheers.\n> \n\nHi again,\nI managed to have a working solution for\n\"d) add a check for the bash version to the top of the test in t/\"\nPlease see diff below.\n\nThis unbreaks the test suite here.\nIs this a good way forward?\n\nFilipe, does the code line you mention above work for you?\n\nIf yes: I can test it here, if you send it as a patch.\n\n/Torsten\n\n\n\ndiff --git a/t/t5801-remote-helpers.sh b/t/t5801-remote-helpers.sh\nold mode 100644\nnew mode 100755\nindex 6e4e078..ea3d0f3\n--- a/t/t5801-remote-helpers.sh\n+++ b/t/t5801-remote-helpers.sh\n@@ -13,6 +13,15 @@ compare_refs() {\n        test_cmp expect actual\n }\n \n+cat >\"testbashArray\" <<-EOF\n+  declare -A assa\n+EOF\n+\n+/bin/bash testbashArray || {\n+       skip_all='t5801. /bin/bash does not handle associative arrays'\n+       test_done\n+}\n+\n test_expect_success 'setup repository' '\n        git init server &&\n        (cd server &&\n"},{"id":"203454","messageId":"CAMP44s22kuXqUjY2Oy2YtBfj1+kF2rHnRKcovV8sPkhu1oR+2A@mail.gmail.com","threadId":"32054","inReplyTo":"50A87718.4030806@web.de","subject":"Re: t5801-remote-helpers.sh fails","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2012-11-18T08:23:40Z","receivedAt":"2012-11-18T08:23:40Z","isPatch":false,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Hi,\n\nOn Sun, Nov 18, 2012 at 6:50 AM, Torsten Bögershausen <tboegi@web.de> wrote:\n\n> I managed to have a working solution for\n> \"d) add a check for the bash version to the top of the test in t/\"\n> Please see diff below.\n>\n> This unbreaks the test suite here.\n> Is this a good way forward?\n>\n> Filipe, does the code line you mention above work for you?\n>\n> If yes: I can test it here, if you send it as a patch.\n\nIt's already sent:\nhttp://article.gmane.org/gmane.comp.version-control.git/209364\n\n-- \nFelipe Contreras\n"},{"id":"203487","messageId":"50A9043B.6070904@web.de","threadId":"32054","inReplyTo":"CAMP44s22kuXqUjY2Oy2YtBfj1+kF2rHnRKcovV8sPkhu1oR+2A@mail.gmail.com","subject":"Re: t5801-remote-helpers.sh fails","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2012-11-18T15:52:27Z","receivedAt":"2012-11-18T15:52:27Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 18.11.12 09:23, Felipe Contreras wrote:\n> Hi,\n> \n> On Sun, Nov 18, 2012 at 6:50 AM, Torsten Bögershausen <tboegi@web.de> wrote:\n> \n>> I managed to have a working solution for\n>> \"d) add a check for the bash version to the top of the test in t/\"\n>> Please see diff below.\n>>\n>> This unbreaks the test suite here.\n>> Is this a good way forward?\n>>\n>> Filipe, does the code line you mention above work for you?\n>>\n>> If yes: I can test it here, if you send it as a patch.\n> \n> It's already sent:\n> http://article.gmane.org/gmane.comp.version-control.git/209364\n> \nThanks for working on it, and sorry that you need to remind me:\nI had the V5 series already on my harddisk, but forgot to test it.\nIt applied on v.1.8.0 with the following results:\n\nok 1 - setup repository\nok 2 - cloning from local repo\nok 3 - create new commit on remote\nok 4 - pulling from local repo\nok 5 - pushing to local repo\nok 6 - fetch new branch\nok 7 - fetch multiple branches\nok 8 - push when remote has extra refs\nok 9 - push new branch by name\nnot ok 10 - push new branch with old:new refspec # TODO known breakage\nok 11 - cloning without refspec\nok 12 - pulling without refspecs\nnot ok 13 - pushing without refspecs # TODO known breakage\nnot ok 14 - pulling with straight refspec # TODO known breakage\nnot ok 15 - pushing with straight refspec # TODO known breakage\nnot ok 16 - pulling without marks # TODO known breakage\nnot ok 17 - pushing without marks # TODO known breakage\nok 18 - push ref with existing object\n# still have 6 known breakage(s)\n/Torsten\n"}]}