From: Jeff King Date: Sat, 12 Feb 2011 08:21:08 GMT Subject: Re: [PATCH] git-gui: give more advice when detaching HEAD Message-ID: <20110212082108.GA19656@sigill.intra.peff.net> In-Reply-To: <7vzkq1y8dv.fsf@alter.siamese.dyndns.org> On Sat, Feb 12, 2011 at 12:17:16AM -0800, Junio C Hamano wrote: > Jeff King writes: > > > Is it that cheap? A full reachability check for something that is not in > > any ref would involve going to the roots, wouldn't it? > > You only need to dig until you hit a merge base, no? Hmm, yeah, you're right. In the worst case of reachability checks, you would share no ancestry and go to the roots searching for the merge base, but of course that is very unlikely to be the case here. So it should be much cheaper. > And merge-base has an interface to compute exactly that, I think. Want to do a proof-of-concept patch? Then we can get some real timings. -Peff