git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git bisect issue
@ 2009-04-04  9:11 malc
  2009-04-04 19:48 ` Christian Couder
  0 siblings, 1 reply; 2+ messages in thread
From: malc @ 2009-04-04  9:11 UTC (permalink / raw)
  To: git

Hello,

I was trying to run git bisect today and stumbled upon this:

$ git bisect start
error: pathspec 'bisect' did not match any file(s) known to git.

.git had some (stale?) BISECT_XXX files in it, and removing them
helped. One of those (BISECT_START) consisted of a single line:
"bisect". If i remember correctly i used to have a bisect branch
in this particular repo.

-- 
mailto:av1474@comtv.ru

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: git bisect issue
  2009-04-04  9:11 git bisect issue malc
@ 2009-04-04 19:48 ` Christian Couder
  0 siblings, 0 replies; 2+ messages in thread
From: Christian Couder @ 2009-04-04 19:48 UTC (permalink / raw)
  To: malc; +Cc: git

Hi,

Le samedi 4 avril 2009, malc@pulsesoft.com a écrit :
> Hello,
>
> I was trying to run git bisect today and stumbled upon this:
>
> $ git bisect start
> error: pathspec 'bisect' did not match any file(s) known to git.
>
> .git had some (stale?) BISECT_XXX files in it, and removing them
> helped. One of those (BISECT_START) consisted of a single line:
> "bisect". If i remember correctly i used to have a bisect branch
> in this particular repo.

When you start bisecting, the current branch is saved in .git/BISECT_START 
so if you started a bisection in a branch named "bisect", then "bisect" was 
saved in ".git/BISECT_START". Then you probably didn't use "git bisect 
reset" to stop bisecting, so the .git/BISECT_START file was not removed.

You probably deleted the "bisect" branch and later when you started a new 
bisection, "git bisect" found the .git/BISECT_START file, so it thought 
that you were currently bisecting.

It then tryed to abort the previous bisection by going back to branch saved 
in the .git/BISECT_START file, and that failed with the error message you 
saw.

The error message could perhaps be improved with this patch:

diff --git a/git-bisect.sh b/git-bisect.sh
index e313bde..093736c 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -77,7 +77,7 @@ 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" -- || exit
        else
                # Get rev from where we start.
                case "$head" in

it will give the following error message instead of the one you saw:

fatal: invalid reference: bisect

Regards,
Christian.

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-04-04 19:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-04  9:11 git bisect issue malc
2009-04-04 19:48 ` Christian Couder

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).