{"thread":{"id":"21789","subject":"help reverting a merge","startedAt":"2009-11-29T23:24:09Z","lastAt":"2009-12-01T00:06:50Z","messageCount":4,"participants":["Justin Mattock","Jeff King","Justin P. Mattock"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"128709","messageId":"dd18b0c30911291524q7ea7e9c7v980340ddf7269519@mail.gmail.com","threadId":"21789","inReplyTo":null,"subject":"help reverting a merge","fromName":"Justin Mattock","fromEmail":"justinmattock@gmail.com","sentAt":"2009-11-29T23:24:09Z","receivedAt":"2009-11-29T23:24:09Z","isPatch":false,"sender":{"key":"justinmattock@gmail.com","avatar":null},"body":"(I'm not on the list, so hopefully this goes through).\nI've done a bisect on a problem with the kernel,\nand am a bit confused on what to do. i.g. the\nresults are showing this:\na03fdb7612874834d6847107198712d18b5242c7 is the first bad commit\n\nwhen trying to revert this commit I get this:\ngit revert a03fdb7612874834d6847107198712d18b5242c7\nfatal: Commit a03fdb7612874834d6847107198712d18b5242c7 is a merge but\nno -m option was given.\n\nthen doing this I get this:\n\ngit revert -m 1 a03fdb7612874834d6847107198712d18b5242c7\nAutomatic revert failed.  After resolving the conflicts,\nmark the corrected paths with 'git add <paths>' or 'git rm <paths>'\nand commit the result.\n\nhow do I find out the commits in this merge to automatically\nrevert to find the problem that's causing this bug?\n\n\n-- \nJustin P. Mattock\n"},{"id":"128747","messageId":"20091130081315.GA587@coredump.intra.peff.net","threadId":"21789","inReplyTo":"dd18b0c30911291524q7ea7e9c7v980340ddf7269519@mail.gmail.com","subject":"Re: help reverting a merge","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-11-30T08:13:15Z","receivedAt":"2009-11-30T08:13:15Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, Nov 29, 2009 at 03:24:09PM -0800, Justin Mattock wrote:\n\n> I've done a bisect on a problem with the kernel,\n> and am a bit confused on what to do. i.g. the\n> results are showing this:\n> a03fdb7612874834d6847107198712d18b5242c7 is the first bad commit\n>\n> [...]\n> \n> how do I find out the commits in this merge to automatically\n> revert to find the problem that's causing this bug?\n\nThere is some discussion here:\n\nhttp://www.kernel.org/pub/software/scm/git/docs/user-manual.html#bisect-merges\n\nBasically neither merged branch was buggy on its own, but together they\nhave a bug.  You can try rebasing the two sides of the merge into a\nlinear history, and then bisecting on that:\n\n  # order doesn't matter here, but rebasing 12e0933 on top makes more\n  # sense since it has many fewer commits between it and the merge-base\n  # (and you'll need to fix up conflicts manually, so the smaller the\n  # rebase the better)\n  git checkout 12e0933\n  git rebase 202c467\n\n  # to be safe, confirm that the rebase result shows your bug;\n  # we know that 202c467 doesn't have the bug, or we would not have\n  # bisected to the merge commit before\n  test test test\n  git bisect start\n  git bisect bad HEAD\n  git bisect good 202c467\n\nwhich should give you the specific commit on the side branch where the\nbreakage occurred.\n\nThis has been discussed as a technique before, and I have a feeling in\nthe back of my mind that maybe there was talk of having git-bisect help\nwith this case, but I don't think anything ever came of it. Christian\n(cc'd) would probably know more.\n\n-Peff\n"},{"id":"128750","messageId":"4B1382DE.1030506@gmail.com","threadId":"21789","inReplyTo":"20091130081315.GA587@coredump.intra.peff.net","subject":"Re: help reverting a merge","fromName":"Justin P. Mattock","fromEmail":"justinmattock@gmail.com","sentAt":"2009-11-30T08:31:26Z","receivedAt":"2009-11-30T08:31:26Z","isPatch":false,"sender":{"key":"justinmattock@gmail.com","avatar":null},"body":"On 11/30/09 00:13, Jeff King wrote:\n> On Sun, Nov 29, 2009 at 03:24:09PM -0800, Justin Mattock wrote:\n>\n>> I've done a bisect on a problem with the kernel,\n>> and am a bit confused on what to do. i.g. the\n>> results are showing this:\n>> a03fdb7612874834d6847107198712d18b5242c7 is the first bad commit\n>>\n>> [...]\n>>\n>> how do I find out the commits in this merge to automatically\n>> revert to find the problem that's causing this bug?\n>\n> There is some discussion here:\n>\n> http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#bisect-merges\n>\n> Basically neither merged branch was buggy on its own, but together they\n> have a bug.  You can try rebasing the two sides of the merge into a\n> linear history, and then bisecting on that:\n>\n>    # order doesn't matter here, but rebasing 12e0933 on top makes more\n>    # sense since it has many fewer commits between it and the merge-base\n>    # (and you'll need to fix up conflicts manually, so the smaller the\n>    # rebase the better)\n>    git checkout 12e0933\n>    git rebase 202c467\n>\n>    # to be safe, confirm that the rebase result shows your bug;\n>    # we know that 202c467 doesn't have the bug, or we would not have\n>    # bisected to the merge commit before\n>    test test test\n>    git bisect start\n>    git bisect bad HEAD\n>    git bisect good 202c467\n>\n> which should give you the specific commit on the side branch where the\n> breakage occurred.\n>\n> This has been discussed as a technique before, and I have a feeling in\n> the back of my mind that maybe there was talk of having git-bisect help\n> with this case, but I don't think anything ever came of it. Christian\n> (cc'd) would probably know more.\n>\n> -Peff\n>\n\nahh cool..\nI'll have a read on this in the\nmorning(late now)and see if I can do this\nto find the bug.(keep in mind might take\nsome time i.g. not good at using git,\nbut am willing to learn a thing or two).\n\nJustin P. Mattock\n"},{"id":"128821","messageId":"4B145E1A.9040304@gmail.com","threadId":"21789","inReplyTo":"20091130081315.GA587@coredump.intra.peff.net","subject":"Re: help reverting a merge","fromName":"Justin P. Mattock","fromEmail":"justinmattock@gmail.com","sentAt":"2009-12-01T00:06:50Z","receivedAt":"2009-12-01T00:06:50Z","isPatch":false,"sender":{"key":"justinmattock@gmail.com","avatar":null},"body":"First things first is I owe you a great thanks\nfor teaching me how to do a rebase.. :-)\n\ntook a while, and still a bit confusing\nbut I managed to do exactly what you\nhad written down.\n\nbad thing is somehow the bisect came up\nwith no results. probably will do another bisect,\njust to make sure things are in the right\ndirection, and the try the rebase again.\n\nAgain Thanks for the help/info on this.\n\nJustin P. Mattock\n"}]}