Skip to content

Introduce --first-parent flag for git bisect

Aaron Lipman via GitGitGadget git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3rev-list: allow bisect and first-parent flagsDocumentation/rev-list-options.txt bisect.c bisect.h +4 more+79 -272 replies
2/3bisect: introduce first-parent flagDocumentation/git-bisect.txt bisect.c bisect.h +2 more+52 -60 replies
3/3bisect: combine args passed to find_bisection()bisect.c bisect.h builtin/rev-list.c+37 -200 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by.

PatchTiago BotelhoHarald NordgrenMartin Ågren
SeriesBased-on-patch-by Based-on-patch-by Based-on-patch-by Based-on-patch-by Based-on-patch-by Based-on-patch-by Based-on-patch-by Based-on-patch-by Helped-by
1/3Based-on-patch-by
2/3
3/3Based-on-patch-by

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 0/3] Introduce --first-parent flag for git bisect

I've always wished git bisect had a first-parent flag, e.g. "git bisect start --first-parent"

This option would be particularly useful in avoiding false positives when bisecting, if a merged branch contained broken or non-buildable commits, but the merge itself was OK.

There have been a couple attempts/iterations towards this functionality in the past two years or so, and I'd like to get this across the finish line.

The previous iterations have focussed on the preliminary step of editing functions in bisect.c to accept a first_parent_only parameter, enabling the --bisect and --first-parent flags to be used in conjunction with git rev-list. In addition to updating git rev-list, I intend to enable the --first-parent flag on git bisect as well.

I've taken some of the feedback from previous iterations into account, specifically tidying up the code that assigns weights to commits in do_find_bisection(), utilizing existing commit graphs when running tests, and clarifying the test for "git rev-list --bisect-all --first-parent"

Previous two iterations (most recent first):
https://lore.kernel.org/git/[email protected]/
https://lore.kernel.org/git/[email protected]/

Related discussion about combining multiple boolean params passed to find_bisection() into a single unsigned integer:
https://lore.kernel.org/git/[email protected]/

Aaron Lipman (3):
rev-list: allow bisect and first-parent flags
bisect: introduce first-parent flag
bisect: combine args passed to find_bisection()

 Documentation/git-bisect.txt       | 13 +++++-
 Documentation/rev-list-options.txt |  7 ++--
 bisect.c                           | 66 +++++++++++++++++++++---------
 bisect.h                           |  7 +++-
 builtin/bisect--helper.c           | 16 ++++++--
 builtin/rev-list.c                 |  9 +++-
 revision.c                         |  3 --
 t/t6000-rev-list-misc.sh           |  4 +-
 t/t6002-rev-list-bisect.sh         | 45 ++++++++++++++++++++
 t/t6030-bisect-porcelain.sh        | 17 ++++++++
 10 files changed, 151 insertions(+), 36 deletions(-)

base-commit: 00a7a21b97a47889cf66de32f8defed023c14c2c
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-686%2Falipman88%2Fbisect_first_parent_final_draft-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-686/alipman88/bisect_first_parent_final_draft-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/686

Signature · 1 line
gitgitgadget