From: Carl Worth <cworth@cworth.org>
To: Mike Galbraith <efault@gmx.de>
Cc: git <git@vger.kernel.org>
Subject: [PATCH] Eliminate confusing "won't bisect on seeked tree" failure
Date: Thu, 21 Feb 2008 09:32:50 -0800 [thread overview]
Message-ID: <87pruqfc59.wl%cworth@cworth.org> (raw)
In-Reply-To: <1203571214.24456.6.camel@homer.simson.net>
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 <cworth@cworth.org>
---
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
next prev parent reply other threads:[~2008-02-21 18:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-21 5:20 bisect: "won't bisect on seeked tree" Mike Galbraith
2008-02-21 5:33 ` Shawn O. Pearce
2008-02-21 5:39 ` Mike Galbraith
2008-02-21 5:43 ` Shawn O. Pearce
2008-02-21 6:00 ` Mike Galbraith
2008-02-21 17:32 ` Carl Worth [this message]
2008-02-22 17:18 ` [PATCH] Eliminate confusing "won't bisect on seeked tree" failure Junio C Hamano
2008-02-23 9:21 ` Karl Hasselström
2008-02-23 18:33 ` Carl Worth
2008-02-23 22:59 ` Junio C Hamano
2008-02-24 1:14 ` Carl Worth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pruqfc59.wl%cworth@cworth.org \
--to=cworth@cworth.org \
--cc=efault@gmx.de \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).