git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Possible git bisect behavior issue when skipping commits

From
BHBegad Habib <begadhabib989@gmail.com>
Date
Jul 19, 2025, 15:31 UTC
Message-ID
<CACy3CeRjyGb-T=hJURJbXXcR+_KtCsRsMzyw0EvusCZOpWb4Xw@mail.gmail.com>
Hi Git developers,
I've been analyzing the behavior of `git bisect` when dealing with
skipped commits and noticed what might be an unexpected result. I
wanted to share a minimal reproduction to understand whether this is
intended behavior.
--
## Environment
- Git version: 2.43.0
- OS: Ubuntu 22.04
---
Steps to Reproduce

```mkdir bisect-bug-test && cd bisect-bug-test git init

# Commit 1 – good echo "good" > file.txt git add file.txt git commit -m "Commit 1 - good"

# Commit 2 – skipped echo "middle" > file.txt git add file.txt git commit -m "Commit 2 - middle"

# Commit 3 – bad echo "bad" > file.txt git add file.txt git commit -m "Commit 3 - bad"

# Start bisect git bisect start git bisect bad git bisect good HEAD~2 git bisect skip HEAD~1

Observed Output

There are only 'skip'ped commits left to test. The first bad commit could be any of: <commit 1> <commit 2> We cannot bisect more!

This output is a bit confusing, since the bad commit was already identified (HEAD, i.e., Commit 3), and the middle one was explicitly skipped. Including the good commit (Commit 1) in the potential bad list could mislead users into thinking it might be faulty.

Question

Is this the expected behavior for skipped commits? Or could the output be more accurate by excluding commits already marked as good?

Thanks for your time and the amazing work you all do on Git 🙏 Best regards

Next: Junio C Hamano
Message 1 of 4 in “Possible git bisect behavior issue when skipping commits”
  1. Begad HabibJul 19, 2025
  2. Junio C HamanoJul 20, 2025
  3. Christian CouderJul 20, 2025
  4. Junio C HamanoJul 21, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.