Christian Couder <christian.couder@xxxxxxxxx> writes: >> How to reproduce: >> $ echo foo > .git/BISECT_START >> $ git bisect start HEAD HEAD^ >> >> Fails with "fatal: invalid reference:" on git 1.7.6. > > Yeah, it looks like a very old behavior. > I'd suggest a simple improvement in the error message like this: > > diff --git a/git-bisect.sh b/git-bisect.sh > index c21e33c..bd7155b 100755 > --- a/git-bisect.sh > +++ b/git-bisect.sh > @@ -67,7 +67,8 @@ bisect_start() { > then > # Reset to the rev from where we started. > start_head=$(cat "$GIT_DIR/BISECT_START") > - git checkout "$start_head" -- || exit > + git checkout "$start_head" -- || > + die "Could not checkout previous start point > '$start_head'. Try 'git bisect reset <branch>' first." I do not necessarily think this is a bug to begin with --- the user had a bad state, and bisect stopped without doing further damage. The real question is what the sensible suggestion/advice the new message should give. It would have to involve bisect reset in the end to get rid of the stale bisect state, but wouldn't the user potentially lose some other state if s/he blindly followed the die message's suggestion and ran "bisect reset"? -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html