git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* git-bisect behaves differently when started in equivalent ways
@ 2022-04-11 14:41 Christoph Groth
  2022-04-13  8:37 ` Christian Couder
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Groth @ 2022-04-11 14:41 UTC (permalink / raw)
  To: git

Hello,

I found a puzzling behavior with git-bisect for which I was unable to
find any explanation.  Since this might be a bug, I report it here.

cheers
Christoph


What did you do before the bug happened? (Steps to reproduce your issue)

While bisecting a regression caused by a backwards-incompatible change
in the sympy project, I noticed that “git bisect” can behave
differently when started in different but supposedly equivalent ways.

The following complete log demonstrates the issue.

For the first run, I clone the “sympy” repository and start bisect with
“git bisect start” (as shown in the first example of the git bisect
manpage).  I declare a good and a bad commit and am asked to estimate
a specific commit.  I declare this one to be good (which it is for my
particular problem), but this causes git to remark that a commit is
“both good and bad”.

For the second run, I provide the bad and the good commit to git-bisect
start right away.  I am asked to examine the same commit as before to
which I give the same assessment.  This time, git-bisect accepts this.

# Preparation
/tmp% git clone https://github.com/sympy/sympy.git
Cloning into 'sympy'...
(...)
/tmp% cd sympy 
/tmp/sympy% git checkout sympy-1.7.1
Note: switching to 'sympy-1.7.1'.
(...)
HEAD is now at 9e8f62e059 Merge pull request #20592 from oscarbenjamin/pr_latex_filename

# First run
/tmp/sympy% git bisect start
/tmp/sympy% git bisect good
/tmp/sympy% git bisect bad sympy-1.10.1
Bisecting: a merge base must be tested
[da03c3227771953b0dd175b5b2ef65ebb937b0df] Merge pull request #20228 from sidhu1012/perf
/tmp/sympy% git describe
sympy-1.6-2010-gda03c32277
/tmp/sympy% git bisect good
f5bba2a7147ef8a6980ff043e93dd038c14bb9bc was both good and bad

# Second run
/tmp/sympy% git bisect reset
Previous HEAD position was da03c32277 Merge pull request #20228 from sidhu1012/perf
HEAD is now at 9e8f62e059 Merge pull request #20592 from oscarbenjamin/pr_latex_filename
/tmp/sympy% git bisect start sympy-1.10.1 sympy-1.7.1
Bisecting: a merge base must be tested
[da03c3227771953b0dd175b5b2ef65ebb937b0df] Merge pull request #20228 from sidhu1012/perf
/tmp/sympy% git describe
sympy-1.6-2010-gda03c32277
/tmp/sympy% git bisect good
Bisecting: 2606 revisions left to test after this (roughly 11 steps)
[b335cf582f4a789b725cc37822d6eed42c8d9e71] add test and fix space

What did you expect to happen? (Expected behavior)

I expected git-bisect to behave in the same way both times.

What happened instead? (Actual behavior)

One time it complains that a commit is “both good and bad”, one time it
does not.

Anything else you want to add:

I could not find any explanation for the difference.  If it is
intentional I suggest documenting it more clearly.


[System Info]
git version:
git version 2.30.2
cpu: x86_64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
uname: Linux 5.10.0-13-amd64 #1 SMP Debian 5.10.106-1 (2022-03-17) x86_64
compiler info: gnuc: 10.2
libc info: glibc: 2.31
$SHELL (typically, interactive shell): /bin/zsh


[Enabled Hooks]

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

* Re: git-bisect behaves differently when started in equivalent ways
  2022-04-11 14:41 git-bisect behaves differently when started in equivalent ways Christoph Groth
@ 2022-04-13  8:37 ` Christian Couder
  0 siblings, 0 replies; 2+ messages in thread
From: Christian Couder @ 2022-04-13  8:37 UTC (permalink / raw)
  To: Christoph Groth; +Cc: git

Hi,

On Tue, Apr 12, 2022 at 9:51 PM Christoph Groth
<christoph@grothesque.org> wrote:

> I found a puzzling behavior with git-bisect for which I was unable to
> find any explanation.  Since this might be a bug, I report it here.

Thanks for reporting this strange behavior.

Unfortunately when trying to reproduce, I don't get
"f5bba2a7147ef8a6980ff043e93dd038c14bb9bc was both good and bad" like
you, but the expected:

Bisecting: 2606 revisions left to test after this (roughly 11 steps)
[b335cf582f4a789b725cc37822d6eed42c8d9e71] add test and fix space

You are using Git 2.30.2 which is one year old. Could you try with a
more recent version like 2.35.1?

Best,
Christian.

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

end of thread, other threads:[~2022-04-13  8:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-11 14:41 git-bisect behaves differently when started in equivalent ways Christoph Groth
2022-04-13  8:37 ` Christian Couder

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).