{"thread":{"id":"16393","subject":"Re: git bisect do not work when good reversion is newer than bad reversion","startedAt":"2008-11-19T13:00:35Z","lastAt":"2008-11-20T08:44:27Z","messageCount":2,"participants":["Junio C Hamano","Andreas Ericsson"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"96148","messageId":"7vljvfswek.fsf@gitster.siamese.dyndns.org","threadId":"16393","inReplyTo":"6077B97E85E7374DAE87B42B5AA997970D0B12@sshaexmb1.amd.com","subject":"Re: git bisect do not work when good reversion is newer than bad reversion","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-11-19T13:00:35Z","receivedAt":"2008-11-19T13:00:35Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Cai, Crane\" <Crane.Cai@amd.com> writes:\n\n> Hi Junio,\n>\n> Sorry to disturb you. Here the requirement I met can not find answer\n> from website. That's why I directly ask you.\n>\n> I need to use \"git bisect\" to find what patch can fix a problem.\n> I found v2.6.25 has this problem.\n> And v2.6.26 does NOT has this problem.\n>\n> Then I use bisect as this:\n>\n> #git bisect start\n> #git bisect good v2.6.26\n> #git bisect bad v2.6.25\n>\n> No reversion cut via these steps. Do you know whether git command can\n> achieve this requirement or not?\n\nYou can use \"git bisect\" to find a single change that fixed the issue\n(_provided if_ such a single change exists).  There is a small mental\ntrick you need to exercise.\n\nFirst, realize that bisect is about \"it used to be like this, but later it\nturned into that.  Where did that single transition from this to that\nhappened\"?  Usually, \"this\" is \"had this particular bug and was broken\"\nand \"that\" is \"that bug was fixed and things work smoothly\".  In your\ncase, however, \"this\" is \"broken\" and \"that\" is \"fixed\".  IOW, the\nquestion you ask \"bisect\" is \"it used to be broken but later it was fixed;\nwhere did that exactly happen?\".\n\nThe mental trick is to swap \"good\" and \"bad\" in order to adjust to your\nuse, because you are using bisect in a reverse way from the usual.  Usual\ncase uses \"good\" mark \"this\" while \"bad\" is used to mark \"that\" in the\nsentence \"it used to be like this, but later it turned into that\".\n\nSo what you would do is...\n\n\t(1) First of all, write on a piece of paper:\n\n\t    good - the version _STILL_ has the bug.\n            bad  - the version does not have the bug _ANYMORE_\n\n\t(2) Start with \"git bisect v2.6.25 v2.6.26\";\n\n        (3) As you test each revision, look at the memo you made.  Say\n            \"good\" if it still has the bug you are interested in; say\n            \"bad\" if it does not have the bug anymore..\n\n    cf. http://thread.gmane.org/gmane.comp.version-control.git/86063\n\nBy the way, I usually drop requests-for-help on the floor unless it is\nCC'ed to the mailing list, because my time spent on writing the response\nlike this message will be wasted and wouldn't help the git community at\nall.  I simply do not have enough time to give unpaid support for\nindividuals.  I am making exception this time only because I am waiting\nfor something and I happen to have nothing else to do while doing so.\n\nPlease send this kind of request-for-help to <git@vger.kernel.org>, the\nmain mailing list, to which anybody can send messages without subscribing.\n"},{"id":"96205","messageId":"4925236B.3020404@op5.se","threadId":"16393","inReplyTo":"7vljvfswek.fsf@gitster.siamese.dyndns.org","subject":"Re: git bisect do not work when good reversion is newer than bad reversion","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2008-11-20T08:44:27Z","receivedAt":"2008-11-20T08:44:27Z","isPatch":false,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"Junio C Hamano wrote:\n> \"Cai, Crane\" <Crane.Cai@amd.com> writes:\n> \n>> Hi Junio,\n>>\n>> Sorry to disturb you. Here the requirement I met can not find answer\n>> from website. That's why I directly ask you.\n>>\n>> I need to use \"git bisect\" to find what patch can fix a problem.\n>> I found v2.6.25 has this problem.\n>> And v2.6.26 does NOT has this problem.\n>>\n>> Then I use bisect as this:\n>>\n>> #git bisect start\n>> #git bisect good v2.6.26\n>> #git bisect bad v2.6.25\n>>\n>> No reversion cut via these steps. Do you know whether git command can\n>> achieve this requirement or not?\n> \n> You can use \"git bisect\" to find a single change that fixed the issue\n> (_provided if_ such a single change exists).  There is a small mental\n> trick you need to exercise.\n> \n> First, realize that bisect is about \"it used to be like this, but later it\n> turned into that.  Where did that single transition from this to that\n> happened\"?  Usually, \"this\" is \"had this particular bug and was broken\"\n> and \"that\" is \"that bug was fixed and things work smoothly\".  In your\n> case, however, \"this\" is \"broken\" and \"that\" is \"fixed\".  IOW, the\n> question you ask \"bisect\" is \"it used to be broken but later it was fixed;\n> where did that exactly happen?\".\n> \n> The mental trick is to swap \"good\" and \"bad\" in order to adjust to your\n> use, because you are using bisect in a reverse way from the usual.  Usual\n> case uses \"good\" mark \"this\" while \"bad\" is used to mark \"that\" in the\n> sentence \"it used to be like this, but later it turned into that\".\n> \n> So what you would do is...\n> \n> \t(1) First of all, write on a piece of paper:\n> \n> \t    good - the version _STILL_ has the bug.\n>             bad  - the version does not have the bug _ANYMORE_\n> \n> \t(2) Start with \"git bisect v2.6.25 v2.6.26\";\n> \n>         (3) As you test each revision, look at the memo you made.  Say\n>             \"good\" if it still has the bug you are interested in; say\n>             \"bad\" if it does not have the bug anymore..\n> \n>     cf. http://thread.gmane.org/gmane.comp.version-control.git/86063\n> \n\nOr start your bisect run with this:\ngit config alias.fixed \"!git bisect bad\"\ngit config alias.buggy \"!git bisect good\"\n\nThen you can run \"git fixed\" if the bug is fixed, and \"git buggy\" if the\nbug is present.\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n"}]}