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

Re: [PATCH] Create '--merges-only' option for 'git bisect'

From
Stefan Beller <sbeller@google.com>
Date
Apr 11, 2018, 23:33 UTC
Message-ID
<CAGZ79kbt=J5SHsHJTfOZYhgSdn9_gOjVBC3qp_oL0sC-b3ZRmw@mail.gmail.com>
In-Reply-To
<20180411225534.48658-1-haraldnordgren@gmail.com>

On Wed, Apr 11, 2018 at 3:55 PM, Harald Nordgren <haraldnordgren@gmail.com> wrote:

> When ran with '--merges-only', git bisect will only look at merge commits -- commits with 2 or more parents or the initial commit.

There has been quite some talk on the mailing list, e.g. https://public-inbox.org/git/20160427204551.GB4613@virgo.localdomain/ which suggests a --first-parent mode instead. For certain histories these are the same, but merges-only is more restrictive for back-and-forth-cross merges.

Show 6 quoted lines
>
> Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>
> ---
>
> Notes:
>     Proof of concept of a feature that I have wanted in Git for a while. In my daily work my company uses GitHub, which creates lots of merge commits. In general, tests are only ran on the tip of a branch before merging, so the different commits within a merge commit are allowed not to be buildable. Therefore 'git bisect' often doesn't work since it will give lots of false positives for anything that is not a merge commit. If we could have a feature to only bisect merge commits then it would be easier to pinpoint which merge causes any particular issue. After that, a bisect could be done within the merge to pinpoint futher. As a follow-up to this patch -- we could potentially create a feature that automatically continues into regular bisect within the bad merge commit after completed '--merges-only' bisection.
The github workflow you mention sounds as if --first-parent would do, too?
Previous: Harald NordgrenNext: Harald Nordgren
Message 2 of 12 in “Create '--merges-only' option for 'git bisect'”
  1. Create '--merges-only' option for 'git bisect'Harald Nordgren, Apr 11, 2018
  2. Stefan BellerApr 11, 2018
  3. Harald NordgrenApr 12, 2018
  4. Christian CouderApr 12, 2018
  5. Tiago BotelhoApr 12, 2018
  6. Johannes SchindelinApr 12, 2018
  7. Tiago BotelhoApr 12, 2018
  8. Johannes SchindelinApr 30, 2018
  9. Tiago BotelhoApr 30, 2018
  10. Johannes SchindelinMay 1, 2018
  11. Johannes SchindelinApr 12, 2018
  12. Johannes SchindelinApr 12, 2018

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.