On 5 Jan, 16:30, Thomas Ferris Nicolaisen <tfn...@gmail.com> wrote:
> The intention of bisect is to get the first bad commit. From the docs:
>
> "Eventually there will be no more revisions left to bisect, and you will
> have been left with the first bad kernel revision in "refs/bisect/bad"."
>
> So git bisect run ending up with a commit which is "good" doesn't make
> sense.

Well, it clearly tells me which is the bad commit. But HEAD seem to be
left at the last iteration.

> If you manually run the test/script again, after running git bisect run -
> is the result actually positive (returncode is 0)?

bisect-test-run  ; echo "dollar qmark is $?"
gives:
dollar qmark is 0

> Can you try manually bisecting and see if you end up with the same results?

That will take too long as each iteration is long and I don't have
time to sit and wait for each one.

> If all else fails, try re-creating the problem in a little dummy project,
> which you can share with us (put on github or something).

But I can make a small example to reproduce this. You can try to run
it yourself.

mkdir remove-me.git
cd remove-me.git
git init
cat  > hello.sh <<EOS
#/bin/sh
#c0
/bin/true
EOS
chmod a+x hello.sh
git add hello.sh
git commit -m "c0" hello.sh
sed -i s/c0/c1/ hello.sh
git commit -m "c1" hello.sh
git rev-parse HEAD > this-is-good
sed -i s/c1/c2/ hello.sh
git commit -m "c2" hello.sh
sed -i s/c2/c3/ hello.sh
git commit -m "c3" hello.sh
sed -i s/c3/c4/ hello.sh
sed -i s/true/false/ hello.sh
git commit -m "c4" hello.sh
git rev-parse HEAD > this-is-bad

git bisect start
git bisect good $(cat this-is-good)
git bisect bad $(cat this-is-bad)
git bisect run ./hello.sh > git-bisect-run.out

git rev-parse HEAD > this-is-after-git-bisect-run
git bisect log | grep 'git bisect'
git bisect reset
sed -n s'/\([0-9a-f]\{40\}\) is the first bad commit/\1/p' git-bisect-
run.out
cat this-is-after-git-bisect-run

I get the following result:

git bisect start
git bisect good 5d3b094d474098be2db9873b2e967b7b09341a3a
git bisect bad f2e0970cd5f6ce94dd9a4fa887a76daa8b5cf95e
git bisect good 6d63d6f4f9152676b4d6cb4f8a68d64a1c5133e1
git bisect reset
Previous HEAD position was 6d63d6f... c3
Switched to branch 'master'
sed -n s'/\([0-9a-f]\{40\}\) is the first bad commit/\1/p' git-bisect-
run.out
f2e0970cd5f6ce94dd9a4fa887a76daa8b5cf95e
cat this-is-after-git-bisect-run
6d63d6f4f9152676b4d6cb4f8a68d64a1c5133e1



-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.

Reply via email to