git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Christian Couder <christian.couder@gmail.com>
Cc: Stefan Haller <lists@haller-berlin.de>,
	 Olliver Schinagl <oliver@schinagl.nl>,
	 git@vger.kernel.org
Subject: Re: Allow git bisect to auto-skip
Date: Sun, 24 Mar 2024 11:34:26 -0700	[thread overview]
Message-ID: <xmqq8r27sclp.fsf@gitster.g> (raw)
In-Reply-To: <CAP8UFD2DhkmVias+RfMESJz9Z-rKKHWHB+MFHcDb9QLO16TOhg@mail.gmail.com> (Christian Couder's message of "Sun, 24 Mar 2024 15:29:15 +0100")

Christian Couder <christian.couder@gmail.com> writes:

> Also, how much better would this be compared to tracking  "git bisect
> run" scripts in the repo, even if they have to be copied somewhere
> else before they are launched? I wonder about this because writing the
> conditions that decide whether the current commit is good or bad might
> not be so easy either. So if the goal is to simplify things for users,
> then simplifying all the way by providing example scripts with
> comments about how they could be customized might be even better.

If we are driving our bisection session via "bisect run" script,
computing the condition that we need to skip in the script is the
most natural and obvious thing to do, but the way I guessed (because
it was not explicitly written down) what the OP wanted was a way for
bisect_next() called after even a manual "git bisect (good|bad)" to
automatically skip certain set of commits.  Because there are cases
where you have to be testing manually and cannot afford to write
"bisect run" script, giving a manual bisection a way to compute if a
commit need to be skipped may be worth having, and that was where my
"git bisect --skip-when <script>" came from.  It would not be
necessary if you are doing "bisect run", which can dynamically tell
if the commit is untestable.  And if the user is going to decide
after manually testing the one that is suggested, it is not useful
either, as the point would be to avoid even asking to test ones that
need to be skipped.  So it is likely that the set of commits that
need skipping is known a-priori before the bisect session even
begins.  The end user experience may look like:

 * "git bisect start" takes "--skip-when <script>" and remembers it,
   together with other options "start" can take (like <good>, <bad>,
   <terms>, <pathspec>).

 - If <good> and <bad> are already given upon "start", the command
   may check out a revision and ask you to test.

 * Every time the command checks out a revision to be tested by the
   user, the command guarantees if it satisfies the --skip-when
   condition (and internally doing "git bisect skip").

 * Otherwise the interaction between the user and the session is
   exactly the same as usual.



  parent reply	other threads:[~2024-03-24 18:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-22 22:18 Allow git bisect to auto-skip Olliver Schinagl
2024-03-22 22:31 ` Junio C Hamano
2024-03-23  1:59   ` Olliver Schinagl
2024-03-23 13:51   ` Stefan Haller
2024-03-23 18:43     ` Junio C Hamano
2024-03-23 20:51       ` Olliver Schinagl
2024-03-24  7:47         ` Olliver Schinagl
2024-03-24 10:16       ` Stefan Haller
2024-03-24 14:29         ` Christian Couder
2024-03-24 16:04           ` rsbecker
2024-03-24 18:34           ` Junio C Hamano [this message]
2024-03-27 18:33             ` Olliver Schinagl
2024-03-27 19:24               ` Junio C Hamano
2024-03-28  8:01                 ` Olliver Schinagl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq8r27sclp.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=lists@haller-berlin.de \
    --cc=oliver@schinagl.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).