{"thread":{"id":"5882","subject":"Clueless bisect error message","startedAt":"2006-10-11T07:08:11Z","lastAt":"2006-10-11T18:04:49Z","messageCount":8,"participants":["Nguyen Thai Ngoc Duy","Junio C Hamano","Jeff King","Krzysztof Halasa"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"28579","messageId":"fcaeb9bf0610110008g642da719pb17f7f52169097e2@mail.gmail.com","threadId":"5882","inReplyTo":null,"subject":"Clueless bisect error message","fromName":"Nguyen Thai Ngoc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2006-10-11T07:08:11Z","receivedAt":"2006-10-11T07:08:11Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"$ git bisect start\nwon't bisect on seeked tree\n\nIt complained because .git/head-name contained 't' which had been\ndeleted before. git-bisect reset works. However I'd request git-bisect\nto inform more useful messages. At first, I was completely stunned:\n\"what is a seeked tree? how can I fix that?\"\n-- \nDuy\n"},{"id":"28581","messageId":"7vpsczuxj9.fsf@assigned-by-dhcp.cox.net","threadId":"5882","inReplyTo":"fcaeb9bf0610110008g642da719pb17f7f52169097e2@mail.gmail.com","subject":"Re: Clueless bisect error message","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-10-11T07:22:34Z","receivedAt":"2006-10-11T07:22:34Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Nguyen Thai Ngoc Duy\" <pclouds@gmail.com> writes:\n\n> $ git bisect start\n> won't bisect on seeked tree\n>\n> It complained because .git/head-name contained 't' which had been\n> deleted before. git-bisect reset works. However I'd request git-bisect\n> to inform more useful messages. At first, I was completely stunned:\n> \"what is a seeked tree? how can I fix that?\"\n\nInteresting.  There is certainly something clueless but I am not\nsure if it is git-bisect.\n\nOther git-core tools never create $GIT_DIR/head-name unless\nbisect is in effect, and you end your bisect session by doing\n\"bisect reset\" (otherwise there is no easy way to get back to\nyour original branch head).  How did head-name got 't' in it,\nand how was branch 't' removed?\n\nIf the answer to the first question is because earlier you\ncreated a temporary branch 't' to run a bisect, and the answer\nto the latter is because you ended your bisect session by saying\n\"git checkout -f someotherbranch && git branch -D t\", then we\nshould be able to fix that by removing head-name upon branch\nswitching with \"git checkout\".\n\nBy looking at commit 810255f, however, I suspect that fix would\nbreak Cogito.  The wording of the message actually comes from\nCogito nomenclature.\n"},{"id":"28583","messageId":"fcaeb9bf0610110050h4c3a56fbge19607ff0bc094af@mail.gmail.com","threadId":"5882","inReplyTo":"7vpsczuxj9.fsf@assigned-by-dhcp.cox.net","subject":"Re: Clueless bisect error message","fromName":"Nguyen Thai Ngoc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2006-10-11T07:50:28Z","receivedAt":"2006-10-11T07:50:28Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On 10/11/06, Junio C Hamano <junkio@cox.net> wrote:\n> \"Nguyen Thai Ngoc Duy\" <pclouds@gmail.com> writes:\n>\n> > $ git bisect start\n> > won't bisect on seeked tree\n> >\n> > It complained because .git/head-name contained 't' which had been\n> > deleted before. git-bisect reset works. However I'd request git-bisect\n> > to inform more useful messages. At first, I was completely stunned:\n> > \"what is a seeked tree? how can I fix that?\"\n>\n> Interesting.  There is certainly something clueless but I am not\n> sure if it is git-bisect.\n>\n> Other git-core tools never create $GIT_DIR/head-name unless\n> bisect is in effect, and you end your bisect session by doing\n> \"bisect reset\" (otherwise there is no easy way to get back to\n> your original branch head).  How did head-name got 't' in it,\n> and how was branch 't' removed?\nWell, I probably removed it myself. It's one of my temporary branches\nIIRC. Perhaps I forgot  to do \"bisect reset\".\n\n>\n> If the answer to the first question is because earlier you\n> created a temporary branch 't' to run a bisect, and the answer\n> to the latter is because you ended your bisect session by saying\n> \"git checkout -f someotherbranch && git branch -D t\", then we\n> should be able to fix that by removing head-name upon branch\n> switching with \"git checkout\".\nThat might be the case. I used bisect on this repo a long ago. I'm not\nsure what actually happened.\n\n>\n> By looking at commit 810255f, however, I suspect that fix would\n> break Cogito.  The wording of the message actually comes from\n> Cogito nomenclature.\nAh. I forgot to say I'm using git 1.4.2.1. My only wish is not a fix\n(unless it's a trivial fix) but that bisect should explain the\nsituation better and guide people to fix it. I had grepped bisect man\npage for \"seeked tree\" and was still clueless.\n-- \nDuy\n"},{"id":"28586","messageId":"7v1wpfuv9d.fsf@assigned-by-dhcp.cox.net","threadId":"5882","inReplyTo":"fcaeb9bf0610110050h4c3a56fbge19607ff0bc094af@mail.gmail.com","subject":"Re: Clueless bisect error message","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-10-11T08:11:42Z","receivedAt":"2006-10-11T08:11:42Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Nguyen Thai Ngoc Duy\" <pclouds@gmail.com> writes:\n\n>> By looking at commit 810255f, however, I suspect that fix would\n>> break Cogito.  The wording of the message actually comes from\n>> Cogito nomenclature.\n> Ah. I forgot to say I'm using git 1.4.2.1. My only wish is not a fix\n> (unless it's a trivial fix) but that bisect should explain the\n> situation better and guide people to fix it. I had grepped bisect man\n> page for \"seeked tree\" and was still clueless.\n\nMy point actually was that even a simple rewording is harder\nthan it seems, because that cluelessness actually was introduced\nto help Cogito.  If we do not care about it, we can just reword\nit to say \"Hey you are in the middle of another bisect, or maybe\nyou left your bisect by doing git-checkout earlier?  In either\ncase git-bisect --reset is your friend, oh, and we can run that\nfor you now if you want\".  We could even remove head-name in\ngit-checkout when we see one.\n\nBut I suspect that doing either of these things would harm\nCogito users.  After cg-seek the user is not \"in the middle of\nanother bisect\", and if we run \"git bisect --reset\" when we see\nhead-name, it would probably break it too.\n"},{"id":"28589","messageId":"fcaeb9bf0610110130r42afc270l8e0b5db0b9861c05@mail.gmail.com","threadId":"5882","inReplyTo":"7v1wpfuv9d.fsf@assigned-by-dhcp.cox.net","subject":"Re: Clueless bisect error message","fromName":"Nguyen Thai Ngoc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2006-10-11T08:30:20Z","receivedAt":"2006-10-11T08:30:20Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On 10/11/06, Junio C Hamano <junkio@cox.net> wrote:\n> My point actually was that even a simple rewording is harder\n> than it seems, because that cluelessness actually was introduced\n> to help Cogito.  If we do not care about it, we can just reword\n> it to say \"Hey you are in the middle of another bisect, or maybe\n> you left your bisect by doing git-checkout earlier?  In either\n> case git-bisect --reset is your friend, oh, and we can run that\n> for you now if you want\".  We could even remove head-name in\n> git-checkout when we see one.\n>\n> But I suspect that doing either of these things would harm\n> Cogito users.  After cg-seek the user is not \"in the middle of\n> another bisect\", and if we run \"git bisect --reset\" when we see\n> head-name, it would probably break it too.\nThanks. Now I understand the issue. I'm sorry for my ignorant because\nI haven't used cogito yet.\n\n-- \nDuy\n"},{"id":"28591","messageId":"20061011091411.GA21527@coredump.intra.peff.net","threadId":"5882","inReplyTo":"7v1wpfuv9d.fsf@assigned-by-dhcp.cox.net","subject":"Re: Clueless bisect error message","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2006-10-11T09:14:12Z","receivedAt":"2006-10-11T09:14:12Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Oct 11, 2006 at 01:11:42AM -0700, Junio C Hamano wrote:\n\n> But I suspect that doing either of these things would harm\n> Cogito users.  After cg-seek the user is not \"in the middle of\n> another bisect\", and if we run \"git bisect --reset\" when we see\n> head-name, it would probably break it too.\n\nMaybe expand head-name to include a \"reason\" field? Unfortunately we\ncan't just stick it in the same file and remain compatible with all\nversions, so we'll have to use a new file. Something like:\n\n-- >8 --\ngit-bisect: use head-reason to explain use of head-name\n\nSince many different programs may use head-name to indicate that the working\ntree should not be modified, head-reason gives them a chance to explain what\nthey're doing. This can improve the accuracy of error messages (such as won't\nbisect a seeked tree).\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\nAlternatively, the actual message to show the user could be placed in\nhead-reason. I think it makes more sense as it is, as it provides the\nability for the message to say \"can't X because of Y\" in plain English.\n\nAnd of course we need cogito to start supporting this (but we print\nsomething sane for older versions with don't support head-reason).\n\n git-bisect.sh |   16 +++++++++++++++-\n 1 files changed, 15 insertions(+), 1 deletions(-)\n\ndiff --git a/git-bisect.sh b/git-bisect.sh\nindex 06a8d26..9f49dd3 100755\n--- a/git-bisect.sh\n+++ b/git-bisect.sh\n@@ -57,8 +57,21 @@ bisect_start() {\n \t\tgit checkout $branch || exit\n \t\t;;\n \trefs/heads/*)\n-\t\t[ -s \"$GIT_DIR/head-name\" ] && die \"won't bisect on seeked tree\"\n+\t\tif [ -s \"$GIT_DIR/head-name\" ]; then\n+\t\t    case \"$(cat \"$GIT_DIR/head-reason\" 2>/dev/null)\" in\n+\t\t    bisect)\n+\t\t\tdie \"You are already in the middle of another bisect!\"\n+\t\t\t;;\n+\t\t    seek)\n+\t\t\tdie \"You can't bisect a seeked tree!\"\n+\t\t\t;;\n+\t\t    *)\n+\t\t\tdie \"head-name already exists\"\n+\t\t\t;;\n+\t\t    esac\n+\t\tfi\n \t\techo \"$head\" | sed 's#^refs/heads/##' >\"$GIT_DIR/head-name\"\n+\t\techo bisect >\"$GIT_DIR/head-reason\"\n \t\t;;\n \t*)\n \t\tdie \"Bad HEAD - strange symbolic ref\"\n@@ -182,6 +195,7 @@ bisect_reset() {\n \tgit checkout \"$branch\" &&\n \trm -fr \"$GIT_DIR/refs/bisect\"\n \trm -f \"$GIT_DIR/refs/heads/bisect\" \"$GIT_DIR/head-name\"\n+\trm -f \"$GIT_DIR/head-reason\"\n \trm -f \"$GIT_DIR/BISECT_LOG\"\n \trm -f \"$GIT_DIR/BISECT_NAMES\"\n }\n-- \n1.4.2.3.g2c59-dirty\n\n\n\n> \n> -\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"},{"id":"28597","messageId":"m3ejtfvwvi.fsf@defiant.localdomain","threadId":"5882","inReplyTo":"20061011091411.GA21527@coredump.intra.peff.net","subject":"Re: Clueless bisect error message","fromName":"Krzysztof Halasa","fromEmail":"khc@pm.waw.pl","sentAt":"2006-10-11T12:51:29Z","receivedAt":"2006-10-11T12:51:29Z","isPatch":false,"sender":{"key":"khc@pm.waw.pl","avatar":null},"body":"Jeff King <peff@peff.net> writes:\n\n> +\t\t\tdie \"You can't bisect a seeked tree!\"\n\nJust to make sure: dictionary.reference.com doesn't know the\n\"seeked\" word (I don't either though that may be normal).\n\nShould it read \"sought\"? Not sure what does the message talk about.\n-- \nKrzysztof Halasa\n"},{"id":"28615","messageId":"20061011180449.GA2897@coredump.intra.peff.net","threadId":"5882","inReplyTo":"m3ejtfvwvi.fsf@defiant.localdomain","subject":"Re: Clueless bisect error message","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2006-10-11T18:04:49Z","receivedAt":"2006-10-11T18:04:49Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Oct 11, 2006 at 02:51:29PM +0200, Krzysztof Halasa wrote:\n\n> > +\t\t\tdie \"You can't bisect a seeked tree!\"\n> Just to make sure: dictionary.reference.com doesn't know the\n> \"seeked\" word (I don't either though that may be normal).\n> \n> Should it read \"sought\"? Not sure what does the message talk about.\n\nSeeked is not a \"real\" word in the sense of being in any dictionary. The\npast participle form of \"seek\" is indeed \"sought\" (though one might want\nto use the passive perfect participle form \"being sought\" for this\ncase).\n\nHowever, the use of the word \"sought\" implies to me the classical\ndefinition of the word seek: \"to look for something.\" The definition we\nare using here is a more modern, computer-oriented definition: \"to move\nto a position within an ordered set\" (since we are referring to Cogito's\ncg-seek command). Just as you might verbify (another non-word!) a\ncommand and say \"I catted those files together\", the tree has been\n\"seeked.\" One could argue it should be \"cat'd\" and \"seek'd\" to indicate\ntheir non-word status, but that idiom is common enough among\nprogrammers, especially Unix users, that I suspect it will make sense\neither way.\n\nAt any rate, the word \"seeked\" was in the original error message, so I\ndidn't introduce it. Are other people bothered by it?\n\n-Peff\n"}]}