From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carl Worth Subject: [PATCH] Eliminate confusing "won't bisect on seeked tree" failure Date: Thu, 21 Feb 2008 09:32:50 -0800 Message-ID: <87pruqfc59.wl%cworth@cworth.org> References: <1203571214.24456.6.camel@homer.simson.net> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: git To: Mike Galbraith X-From: git-owner@vger.kernel.org Thu Feb 21 19:07:14 2008 Return-path: Envelope-to: gcvg-git-2@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1JSFok-00039y-Tz for gcvg-git-2@gmane.org; Thu, 21 Feb 2008 19:06:47 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754309AbYBUSGH (ORCPT ); Thu, 21 Feb 2008 13:06:07 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754223AbYBUSGG (ORCPT ); Thu, 21 Feb 2008 13:06:06 -0500 Received: from olra.theworths.org ([82.165.184.25]:54002 "EHLO olra.theworths.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754309AbYBUSGE (ORCPT ); Thu, 21 Feb 2008 13:06:04 -0500 X-Greylist: delayed 1977 seconds by postgrey-1.27 at vger.kernel.org; Thu, 21 Feb 2008 13:06:04 EST Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id F0F0B45496A; Thu, 21 Feb 2008 09:33:06 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pczdcAZQae2S; Thu, 21 Feb 2008 09:33:01 -0800 (PST) Received: from raht.cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 2EBDD431FDF; Thu, 21 Feb 2008 09:33:01 -0800 (PST) In-Reply-To: <1203571214.24456.6.camel@homer.simson.net> User-Agent: Wanderlust/2.14.0 (Africa) Emacs/21.4 Mule/5.0 (SAKAKI) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: This error message is very confusing---it doesn't tell the user anything about how to fix the situation. And the actual fix for the situation ("git bisect reset") does a checkout of a potentially random branch, (compared to what the user wants to be on for the bisect she is starting). The simplest way to eliminate the confusion is to just make "git bisect start" do the cleanup itself. There's no significant loss of safety here since we already have a general safety in the form of the reflog. Signed-off-by: Carl Worth --- On Thu, 21 Feb 2008 06:20:14 +0100, Mike Galbraith wrote: > I have no idea how tree became "seeked", but would love to know how to > "un-seek" it so I can proceed with a bisection. Help? At first I thought this just needed a better error message, (the original "seeked tree" terminology came from cogito where there was a seek command). But then it occurred to me that the error should just be eliminated altogether. And that saves the tool having to explain something it can just do itself. git-bisect.sh | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/git-bisect.sh b/git-bisect.sh index 74715ed..1e532bc 100755 --- a/git-bisect.sh +++ b/git-bisect.sh @@ -75,7 +75,6 @@ bisect_start() { git checkout $branch || exit ;; refs/heads/*|$_x40) - [ -s "$GIT_DIR/head-name" ] && die "won't bisect on seeked tree" echo "${head#refs/heads/}" >"$GIT_DIR/head-name" ;; *) @@ -365,7 +364,6 @@ bisect_reset() { usage ;; esac if git checkout "$branch"; then - rm -f "$GIT_DIR/head-name" bisect_clean_state fi } @@ -377,6 +375,7 @@ bisect_clean_state() { do git update-ref -d $ref $hash done + rm -f "$GIT_DIR/head-name" rm -f "$GIT_DIR/BISECT_LOG" rm -f "$GIT_DIR/BISECT_NAMES" rm -f "$GIT_DIR/BISECT_RUN" -- 1.5.4.1