{"thread":{"id":"9474","subject":"Bug in gitk: can't unset \"idinlist(...) ...\"","startedAt":"2007-08-10T15:41:08Z","lastAt":"2007-08-13T10:31:22Z","messageCount":10,"participants":["Brian Hetro","Jeff King","Linus Torvalds","Paul Mackerras","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"50417","messageId":"20070810154108.GA779@ruiner","threadId":"9474","inReplyTo":null,"subject":"Bug in gitk: can't unset \"idinlist(...) ...\"","fromName":"Brian Hetro","fromEmail":"whee@smaertness.net","sentAt":"2007-08-10T15:41:08Z","receivedAt":"2007-08-10T15:41:08Z","isPatch":false,"sender":{"key":"whee@smaertness.net","avatar":"https://gravatar.com/avatar/1d20c40734a674e76a0a58c6d122ef493291db306d613a40653a035084d557b9?d=mp&s=160"},"body":"Hi,\nI have a problem with gitk not being able to show one of my\nrepositories (git version 1.5.3.rc4.41.g7efe).  I get this error while\ngitk starts:\n\ncan't unset \"idinlist(f1d795add789ec43d3ccf1d35f3c39fb464f6e72)\": no\nsuch element in array\ncan't unset \"idinlist(f1d795add789ec43d3ccf1d35f3c39fb464f6e72)\": no\nsuch element in array\n    while executing\n\"unset idinlist($id)\"\n    (procedure \"layouttail\" line 11)\n    invoked from within\n\"layouttail\"\n    (procedure \"layoutmore\" line 35)\n    invoked from within\n\"layoutmore $tlimit $allread\"\n    (procedure \"chewcommits\" line 9)\n    invoked from within\n\"chewcommits 1\"\n    (\"eval\" body line 1)\n    invoked from within\n\"eval $script\"\n    (procedure \"dorunq\" line 9)\n    invoked from within\n\"dorunq\"\n    (\"after\" script)\n\nThe repository log is partially displayed.  gitk does work in git\nversion 1.5.2.4, and qgit and giggle also work.  git-fsck --full\n--strict indicates no problems.\n\nI performed a bisect and commit\n1ed84157a21a3e868228b15588e4aadfbe5a030b appears to be the culprit\n(Revert 88494423 (removal of duplicate parents in the output\ncodepath)).\n\nBrian\n"},{"id":"50421","messageId":"20070810161123.GA14875@sigill.intra.peff.net","threadId":"9474","inReplyTo":"20070810154108.GA779@ruiner","subject":"Re: Bug in gitk: can't unset \"idinlist(...) ...\"","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2007-08-10T16:11:23Z","receivedAt":"2007-08-10T16:11:23Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Aug 10, 2007 at 11:41:08AM -0400, Brian Hetro wrote:\n\n> Hi,\n> I have a problem with gitk not being able to show one of my\n> repositories (git version 1.5.3.rc4.41.g7efe).  I get this error while\n> gitk starts:\n> \n> can't unset \"idinlist(f1d795add789ec43d3ccf1d35f3c39fb464f6e72)\": no\n> such element in array\n> [...]\n> \n> I performed a bisect and commit\n> 1ed84157a21a3e868228b15588e4aadfbe5a030b appears to be the culprit\n> (Revert 88494423 (removal of duplicate parents in the output\n> codepath)).\n\nThis was fixed in e1abc69b, which is in 1.5.3-rc3, covered in this\nthread:\n\nhttp://thread.gmane.org/gmane.comp.version-control.git/53126\n\nCan you confirm that it is still a problem in 1.5.3-rc4?\n\n-Peff\n"},{"id":"50427","messageId":"20070810165521.GA19657@coredump.intra.peff.net","threadId":"9474","inReplyTo":"20070810161123.GA14875@sigill.intra.peff.net","subject":"Re: Bug in gitk: can't unset \"idinlist(...) ...\"","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2007-08-10T16:55:21Z","receivedAt":"2007-08-10T16:55:21Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Aug 10, 2007 at 12:11:23PM -0400, Jeff King wrote:\n\n> http://thread.gmane.org/gmane.comp.version-control.git/53126\n> \n> Can you confirm that it is still a problem in 1.5.3-rc4?\n\nI just tried to trigger the original bug (by running \"gitk arch/i386\" in\nthe linux-2.6 repo) using 1.5.3.rc4.41.g7efe, and I couldn't reproduce\nit.\n\nCan you make your test repo available?\n\nNote that the fix _isn't_ in gitk, but rather in git itself. Is it\npossible that gitk is calling another, older version of git-rev-list\nthat you have installed somewhere?\n\n-Peff\n"},{"id":"50430","messageId":"20070810173242.GA23628@coredump.intra.peff.net","threadId":"9474","inReplyTo":"20070810154108.GA779@ruiner","subject":"Re: Bug in gitk: can't unset \"idinlist(...) ...\"","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2007-08-10T17:32:42Z","receivedAt":"2007-08-10T17:32:42Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Aug 10, 2007 at 11:41:08AM -0400, Brian Hetro wrote:\n\n> I have a problem with gitk not being able to show one of my\n> repositories (git version 1.5.3.rc4.41.g7efe).  I get this error while\n> gitk starts:\n> \n> can't unset \"idinlist(f1d795add789ec43d3ccf1d35f3c39fb464f6e72)\": no\n> such element in array\n\nJunio,\n\nI did a little digging on this bug, since it was so similar to the\nduplicate parent errors we were getting a few weeks ago. As it turns\nout, Brian's repository, generated by hg2git, actually has commit\nobjects with duplicate parents in them. Older versions of git used to\nremove duplicate parents for all commits, but due to your commits\n11d65967 and 1ed84157, we now do it just for history simplification.\nWhich is why he was able to bisect it to 1ed84157, even though it is\nperhaps not a git bug.\n\nSo maybe the right attitude is \"hg2git should not be generating such\nbroken commits\" (or \"gitk should not barf on such broken commits\" :) ),\nbut I thought I would mention it as an additional data point for those\nchanges. Should git handle duplicate parents of this fashion more\nrobustly? Or should we just assume that they should never have been\ngenerated in the first place?\n\n-Peff\n"},{"id":"50431","messageId":"alpine.LFD.0.999.0708101109310.30176@woody.linux-foundation.org","threadId":"9474","inReplyTo":"20070810173242.GA23628@coredump.intra.peff.net","subject":"Re: Bug in gitk: can't unset \"idinlist(...) ...\"","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2007-08-10T18:14:13Z","receivedAt":"2007-08-10T18:14:13Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Fri, 10 Aug 2007, Jeff King wrote:\n> \n> So maybe the right attitude is \"hg2git should not be generating such\n> broken commits\"\n\nI think this is true.\n\n> (or \"gitk should not barf on such broken commits\" :) ),\n\nAnd I think this is *also* true.\n\n> but I thought I would mention it as an additional data point for those\n> changes. Should git handle duplicate parents of this fashion more\n> robustly? Or should we just assume that they should never have been\n> generated in the first place?\n\nI think git itself is quite robust in the face of duplicate parents, and \nit really is a gitk bug that it has problems with them. That said, I don't \nthink we should *assume* they don't happen, and while we should consider \nit a bug in hg2git that they did, it is not a \"serious\" bug per se. It's \nonly gitk that reacts this violently to it.\n\nI guess we could prune duplicate parents even for commits that didn't get \nrewritten, but I don't see why we really should even have to. I think Paul \nalready said that he should look into it:\n\n\t\t\t    \"I see from the following messages that the\n    bug turned out to be elsewhere in git, but it looks like gitk should \n    be more robust and do something sensible rather than just throwing a \n    Tcl error.  I'll look at it.\"\n\nso I think we should fix gitk regardless, and then *maybe* also consider \ndoing parent simplification universally.\n\n\t\t\tLinus\n"},{"id":"50463","messageId":"18109.21984.26228.849806@cargo.ozlabs.ibm.com","threadId":"9474","inReplyTo":"alpine.LFD.0.999.0708101109310.30176@woody.linux-foundation.org","subject":"Re: Bug in gitk: can't unset \"idinlist(...) ...\"","fromName":"Paul Mackerras","fromEmail":"paulus@samba.org","sentAt":"2007-08-11T06:23:28Z","receivedAt":"2007-08-11T06:23:28Z","isPatch":false,"sender":{"key":"paulus@samba.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"Linus Torvalds writes:\n\n> I think git itself is quite robust in the face of duplicate parents, and \n> it really is a gitk bug that it has problems with them. That said, I don't \n> think we should *assume* they don't happen, and while we should consider \n> it a bug in hg2git that they did, it is not a \"serious\" bug per se. It's \n> only gitk that reacts this violently to it.\n\nThere has been a commit with duplicate parents in the kernel git tree\nfor ages (13e65280), and gitk handles it just fine, so I don't think\nit's simply a problem with duplicate parents.\n\nI know gitk currently barfs if there are any dangling parents in the\ngit log --parents --boundary output (i.e. any ids which are listed in\nthe second or subsequent position on the commit lines but never in the\nfirst position).  It shouldn't, and I'll fix it.\n\nIt would be nice to know if it is actually dangling parents that is\ncausing the problem, though.\n\nPaul.\n"},{"id":"50482","messageId":"20070811134927.GA2411@coredump.intra.peff.net","threadId":"9474","inReplyTo":"18109.21984.26228.849806@cargo.ozlabs.ibm.com","subject":"Re: Bug in gitk: can't unset \"idinlist(...) ...\"","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2007-08-11T13:49:28Z","receivedAt":"2007-08-11T13:49:28Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sat, Aug 11, 2007 at 04:23:28PM +1000, Paul Mackerras wrote:\n\n> There has been a commit with duplicate parents in the kernel git tree\n> for ages (13e65280), and gitk handles it just fine, so I don't think\n> it's simply a problem with duplicate parents.\n\ngitk fails with this test script, which creates two commits, the second\none referencing the first as a duplicate:\n\nmkdir repo &&\ncd repo &&\ngit-init &&\necho one >file &&\ngit-add file &&\ngit-commit -m one &&\necho two >file &&\ngit-add file &&\ntree=$(git-write-tree) &&\nparent=$(git-rev-parse HEAD) &&\ncommit=$(git-commit-tree $tree -p $parent -p $parent <file) &&\ngit-update-ref HEAD $commit &&\ngitk\n\nTo run it, you will actually need to disable git-commit-tree's checking\nfor duplicate parents. You can do this by commenting out the call to\nnew_parent in builtin-commit-tree.c:114.\n\n-Peff\n"},{"id":"50549","messageId":"18110.63328.644861.651934@cargo.ozlabs.ibm.com","threadId":"9474","inReplyTo":"20070811134927.GA2411@coredump.intra.peff.net","subject":"Re: Bug in gitk: can't unset \"idinlist(...) ...\"","fromName":"Paul Mackerras","fromEmail":"paulus@samba.org","sentAt":"2007-08-12T12:04:48Z","receivedAt":"2007-08-12T12:04:48Z","isPatch":false,"sender":{"key":"paulus@samba.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"Jeff King writes:\n\n> gitk fails with this test script, which creates two commits, the second\n> one referencing the first as a duplicate:\n\nThanks, that shows the problem nicely.  I've pushed out a fix.\n\nPaul.\n"},{"id":"50563","messageId":"7veji8k6rg.fsf@assigned-by-dhcp.cox.net","threadId":"9474","inReplyTo":"18110.63328.644861.651934@cargo.ozlabs.ibm.com","subject":"Re: Bug in gitk: can't unset \"idinlist(...) ...\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-08-12T17:22:11Z","receivedAt":"2007-08-12T17:22:11Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Paul Mackerras <paulus@samba.org> writes:\n\n> Jeff King writes:\n>\n>> gitk fails with this test script, which creates two commits, the second\n>> one referencing the first as a duplicate:\n>\n> Thanks, that shows the problem nicely.  I've pushed out a fix.\n\nThanks; pulled.\n"},{"id":"50629","messageId":"18112.13050.666058.28505@cargo.ozlabs.ibm.com","threadId":"9474","inReplyTo":"7veji8k6rg.fsf@assigned-by-dhcp.cox.net","subject":"Re: Bug in gitk: can't unset \"idinlist(...) ...\"","fromName":"Paul Mackerras","fromEmail":"paulus@samba.org","sentAt":"2007-08-13T10:31:22Z","receivedAt":"2007-08-13T10:31:22Z","isPatch":false,"sender":{"key":"paulus@samba.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"Junio C Hamano writes:\n\n> Thanks; pulled.\n\nUnfortunately the fix I pushed out had a bug.  Please do another pull\nto get a better fix.\n\nPaul.\n"}]}