{"thread":{"id":"55614","subject":"[BUG] gitk error - can't read \"arcnos()\": no such element in array","startedAt":"2021-05-03T21:16:30Z","lastAt":"2021-06-01T00:29:57Z","messageCount":5,"participants":["Chris Packham","Bagas Sanjaya"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"423538","messageId":"CAFOYHZBAg7pkise8bir7Z3qApw9mJB8Z99p6z71-_T6=7rFV7w@mail.gmail.com","threadId":"55614","inReplyTo":null,"subject":"[BUG] gitk error - can't read \"arcnos()\": no such element in array","fromName":"Chris Packham","fromEmail":"judge.packham@gmail.com","sentAt":"2021-05-03T21:16:16Z","receivedAt":"2021-05-03T21:16:30Z","isPatch":false,"sender":{"key":"judge.packham@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155667?v=4"},"body":"Hi,\n\nI'm hitting an error with gitk (gitk 1:2.31.1-0ppa1~ubuntu18.04.1) on\na specific git repository.\n\nThe repository is slightly odd in that it has some replace refs\nconfigured and multiple root commits. Although another similarly\nconfigured repo doesn't hit the error.\n\nThe text from the application error pop-up is:\n\ncan't read \"arcnos()\": no such element in array\ncan't read \"arcnos()\": no such element in array\n    while executing\n\"lsearch -exact $arcnos($l) $a\"\n    (procedure \"splitarc\" line 21)\n    invoked from within\n\"splitarc $olds\"\n    (procedure \"getallclines\" line 33)\n     invoked from within\n\"getallclines file11\"\n     (\"eval\" body line 1)\n     invoked from within\n\"eval $script\"\n    (procedure \"dorunq\" line 11)\n    invoked from within\n\"dorunq\"\n    (\"after\" script)\n\nI've not been able to narrow down a specific reproduction method yet.\n\nThanks,\nChris\n"},{"id":"425952","messageId":"CAFOYHZAfQivHvs5=hGt-A1CbtwW-iJSwC1iFk7FY3wnNcVNVrQ@mail.gmail.com","threadId":"55614","inReplyTo":"CAFOYHZBAg7pkise8bir7Z3qApw9mJB8Z99p6z71-_T6=7rFV7w@mail.gmail.com","subject":"Re: [BUG] gitk error - can't read \"arcnos()\": no such element in array","fromName":"Chris Packham","fromEmail":"judge.packham@gmail.com","sentAt":"2021-05-31T03:11:28Z","receivedAt":"2021-05-31T03:11:48Z","isPatch":false,"sender":{"key":"judge.packham@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155667?v=4"},"body":"On Tue, May 4, 2021 at 9:16 AM Chris Packham <judge.packham@gmail.com> wrote:\n>\n> Hi,\n>\n> I'm hitting an error with gitk (gitk 1:2.31.1-0ppa1~ubuntu18.04.1) on\n> a specific git repository.\n>\n> The repository is slightly odd in that it has some replace refs\n> configured and multiple root commits. Although another similarly\n> configured repo doesn't hit the error.\n>\n> The text from the application error pop-up is:\n>\n> can't read \"arcnos()\": no such element in array\n> can't read \"arcnos()\": no such element in array\n>     while executing\n> \"lsearch -exact $arcnos($l) $a\"\n>     (procedure \"splitarc\" line 21)\n>     invoked from within\n> \"splitarc $olds\"\n>     (procedure \"getallclines\" line 33)\n>      invoked from within\n> \"getallclines file11\"\n>      (\"eval\" body line 1)\n>      invoked from within\n> \"eval $script\"\n>     (procedure \"dorunq\" line 11)\n>     invoked from within\n> \"dorunq\"\n>     (\"after\" script)\n>\n> I've not been able to narrow down a specific reproduction method yet.\n\nThis seems to have fallen on the floor (so I pick memorial weekend in\nthe US to give it a ping).\n\nI have tried building gitk from source (git://ozlabs.org/~paulus/gitk)\nand still see the same problem. Still haven't reproduced it on\nanything other than my one repository.\n"},{"id":"425953","messageId":"aa18c448-9a74-0837-a2bb-008aab31f0e4@gmail.com","threadId":"55614","inReplyTo":"CAFOYHZAfQivHvs5=hGt-A1CbtwW-iJSwC1iFk7FY3wnNcVNVrQ@mail.gmail.com","subject":"Re: [BUG] gitk error - can't read \"arcnos()\": no such element in array","fromName":"Bagas Sanjaya","fromEmail":"bagasdotme@gmail.com","sentAt":"2021-05-31T03:24:12Z","receivedAt":"2021-05-31T03:36:04Z","isPatch":false,"sender":{"key":"bagasdotme@gmail.com","avatar":"https://avatars.githubusercontent.com/u/40219486?v=4"},"body":"On 31/05/21 10.11, Chris Packham wrote:\n> This seems to have fallen on the floor (so I pick memorial weekend in\n> the US to give it a ping).\n> \n> I have tried building gitk from source (git://ozlabs.org/~paulus/gitk)\n> and still see the same problem. Still haven't reproduced it on\n> anything other than my one repository.\n> \n\nSo this issue is repo-specific, right?\n\nIs your problematic repo public? If so, we can test against that.\n\n-- \nAn old man doll... just what I always wanted! - Clara\n"},{"id":"425985","messageId":"d919f68e-42a9-bd74-c16e-8d2c185b6938@gmail.com","threadId":"55614","inReplyTo":"CAFOYHZA4xbnWc1d1zK-fjoDHZntQj7weDZk1r=SOJxVtKD4aOA@mail.gmail.com","subject":"Re: [BUG] gitk error - can't read \"arcnos()\": no such element in array","fromName":"Bagas Sanjaya","fromEmail":"bagasdotme@gmail.com","sentAt":"2021-05-31T07:53:11Z","receivedAt":"2021-05-31T07:53:31Z","isPatch":false,"sender":{"key":"bagasdotme@gmail.com","avatar":"https://avatars.githubusercontent.com/u/40219486?v=4"},"body":"On 31/05/21 14.38, Chris Packham wrote:\n>> Is your problematic repo public? If so, we can test against that.\n>>\n> \n> Unfortunately not. It's actually an internal kernel tree which has a\n> different root to upstream (hence using git replace to attach upstream).\n> All of which make the history a bit funky.\n> \n> I don't know if the problem will survive anonymisation but I can try.\n> \n\nDid you mean vendor kernel tree based on Linux kernel? I think you can \ntry reproducing the issue with either Linus' tree [1] (mainline only) or \nGreg's stable tree [2] (mainline + release branches and tags).\n\n[1]: https://github.com/torvalds/linux\n[2]: https://github.com/gregkh/linux\n\n-- \nAn old man doll... just what I always wanted! - Clara\n"},{"id":"426087","messageId":"CAFOYHZAjzS+fizM+wadgFq3F6tSYu35CJOFuCWPFc5TH6Fq8vg@mail.gmail.com","threadId":"55614","inReplyTo":"d919f68e-42a9-bd74-c16e-8d2c185b6938@gmail.com","subject":"Re: [BUG] gitk error - can't read \"arcnos()\": no such element in array","fromName":"Chris Packham","fromEmail":"judge.packham@gmail.com","sentAt":"2021-06-01T00:29:42Z","receivedAt":"2021-06-01T00:29:57Z","isPatch":false,"sender":{"key":"judge.packham@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155667?v=4"},"body":"On Mon, May 31, 2021 at 7:53 PM Bagas Sanjaya <bagasdotme@gmail.com> wrote:\n>\n> On 31/05/21 14.38, Chris Packham wrote:\n> >> Is your problematic repo public? If so, we can test against that.\n> >>\n> >\n> > Unfortunately not. It's actually an internal kernel tree which has a\n> > different root to upstream (hence using git replace to attach upstream).\n> > All of which make the history a bit funky.\n> >\n> > I don't know if the problem will survive anonymisation but I can try.\n> >\n>\n> Did you mean vendor kernel tree based on Linux kernel?\n\nKind of. A repo that was created in 2007 before we were using git\nproperly by extracting the kernel tarballs and adding our code. So\nalthough it's a kernel tree it shares no common history with Linus'\ntree.\n\ngit fast-export/fast-import doesn't seem to like the affected repo so\nI'm not having much luck with making anything publicly available.\n\n> I think you can\n> try reproducing the issue with either Linus' tree [1] (mainline only) or\n> Greg's stable tree [2] (mainline + release branches and tags).\n>\n> [1]: https://github.com/torvalds/linux\n> [2]: https://github.com/gregkh/linux\n>\n\nI've tried a few experiments\n- cloning the \"bad\" repo -> no problem seen in clone\n- cloning the \"bad\" repo with --mirror -> no problem seen in clone\n- copying the \"bad\" repo -> same problem seen in copy\n\nSo now that I have a copy that shows the problem I can do a few more things.\n- copy repo, remove replace refs (git replace -l | xargs git replace\n-d) -> problem remains\n- copy repo, remove replace refs and all remotes except origin ->\nproblem remains\n- copy repo, run git gc -> no problem\n\nSo the git gc seems to have done the trick. I'm happy enough to leave\nit there and hope that this thread is useful for future mailing list\nsearchers. I'll keep a copy of the affected repo around if there is\nanything someone wants me to try.\n"}]}