From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff King Subject: Re: Why can't I use git-bisect to find the first *good* commit? Date: Mon, 28 Mar 2011 17:25:53 -0400 Message-ID: <20110328212553.GA3334@sigill.intra.peff.net> References: <20110328202521.GB27755@sigill.intra.peff.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Cc: Matthieu Moy , demerphq , Johannes Sixt , =?utf-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= , Git Mailing List To: Andrew Garber X-From: git-owner@vger.kernel.org Mon Mar 28 23:26:04 2011 Return-path: Envelope-to: gcvg-git-2@lo.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q4Jwo-0006AU-PH for gcvg-git-2@lo.gmane.org; Mon, 28 Mar 2011 23:26:03 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752923Ab1C1VZ5 (ORCPT ); Mon, 28 Mar 2011 17:25:57 -0400 Received: from 99-108-226-0.lightspeed.iplsin.sbcglobal.net ([99.108.226.0]:42984 "EHLO peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751160Ab1C1VZ5 (ORCPT ); Mon, 28 Mar 2011 17:25:57 -0400 Received: (qmail 18534 invoked by uid 107); 28 Mar 2011 21:26:37 -0000 Received: from sigill.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.7) (smtp-auth username relayok, mechanism cram-md5) by peff.net (qpsmtpd/0.84) with ESMTPA; Mon, 28 Mar 2011 17:26:37 -0400 Received: by sigill.intra.peff.net (sSMTP sendmail emulation); Mon, 28 Mar 2011 17:25:53 -0400 Content-Disposition: inline In-Reply-To: <20110328202521.GB27755@sigill.intra.peff.net> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: On Mon, Mar 28, 2011 at 04:25:21PM -0400, Jeff King wrote: > On Mon, Mar 28, 2011 at 04:12:49PM -0400, Andrew Garber wrote: > > > But what about demerphq's example? (see below) > > > > > Bx--B--B--B* > > > / > > > --Gz--By--B--Gx--G* > > > > > > How does knowing that G* is good help you to find that Bx broke the > > > code in the B* branch again? > > > > > > Presumably 'By' broke the G* branch which was then fixed by Gx and > > > none of this information helps you at all identify that Bx broke the > > > B* branch. > > > > > > Whereas a plain binary search on the B* branch would eventually find > > > that Bx was responsible. > > If you feed bisect a history where the bug flips off and on between good > and bad commits, you aren't necessarily going to get the answer you > want. But that has nothing to do with the history shape; it is a problem > in a linear history like this, too: > > --G--Bx--B--G--G--By--B Actually, scratch what I said. I misread his graph. The fix has not yet been cherry-picked, it just exists on the other branch. So there is no flipping. But as Matthieu explained in another response, there is still value in bisecting that graph. -Peff