git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Olliver Schinagl <oliver@schinagl.nl>
To: Junio C Hamano <gitster@pobox.com>
Cc: phillip.wood123@gmail.com, phillip.wood@dunelm.org.uk,
	git@vger.kernel.org,
	Christian Couder <christian.couder@gmail.com>,
	Stefan Haller <lists@haller-berlin.de>
Subject: Re: [RFC] bisect: Introduce skip-when to automatically skip commits
Date: Wed, 10 Apr 2024 21:39:52 +0200	[thread overview]
Message-ID: <0c9ad7f2-55e8-4763-8201-f29f15a39616@schinagl.nl> (raw)
In-Reply-To: <xmqqle5lrp46.fsf@gitster.g>

On 10-04-2024 21:31, Junio C Hamano wrote:
> Olliver Schinagl <oliver@schinagl.nl> writes:
> 
>> See, the hook is named 'post-checkout' and thus, it runs after
>> checkout has been performed. So we are now on the 'broken' commit we
>> do not want to test, git should have skipped this already, and not
>> checked it out.
> 
> You are not the only user of this feature (by the way, do not call
> this a "hook".  It should be per "git bisect" session)

Yep, it is stored as part of the bisect session when invoked via as a CLI.

> and others may need to actually inspect their working tree state before being
> able to say "nah, I do not want to test this version, please give me
> another one" by exiting with 125.

So your use of 'You' and 'others' is a bit confusing, if it's me, the 
person, and 'others' the script itself. But yes, I fully agree with what 
you are saying I think. Just 'please give me a nother one' could be done 
in the script itself, or via exit 125 of course (where I totally get 
that doing the 125 routine is much better).


> That is why post-checkout is more
> useful in general.  Contrasted with that, a check that happens
> before the checkout is useful only in a much narrower "I can tell by
> looking only at the commit object name" use case, which I would not
> be interested in seeing.

So that leaves me in the same lack of understanding :p

If we run something post checkout, `bisect_checkout()` has run, and git 
bisect (the application) is (almost) done. The directory has been 
'checked out' (as `bisect_checkout()` of course does `git checkout` 
(unless `no_checkout` is used) The tree is of course in a bisect session.

So if a script runs, and does the 'please give me a nother commit' 
thing, how would that work within `builtin/bisect.c` (or in `bisect.c`). 
This is the part that would puzzle me. The command returns with 125, 
then what? How can git 'go on and give you a nother one'. afaik the only 
return codes from `bisect_next()` etc are BISECT_OK and BISECT_FAIL?

Olliver

> 
> Thanks.
> 
> 


  reply	other threads:[~2024-04-10 19:40 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-30  8:10 [RFC] bisect: Introduce skip-when to automatically skip commits Olliver Schinagl
2024-04-05  6:50 ` Olliver Schinagl
2024-04-06  1:08   ` Junio C Hamano
2024-04-06 10:06     ` Olliver Schinagl
2024-04-06 13:50       ` Phillip Wood
2024-04-06 19:17         ` Olliver Schinagl
2024-04-07 14:09           ` phillip.wood123
2024-04-07 14:52             ` Olliver Schinagl
2024-04-07 15:12               ` phillip.wood123
2024-04-07 21:11                 ` Olliver Schinagl
2024-04-08 16:49                 ` Junio C Hamano
2024-04-10 10:39                   ` Olliver Schinagl
2024-04-10 16:47                     ` Junio C Hamano
2024-04-10 19:22                       ` Olliver Schinagl
2024-04-10 19:31                         ` Junio C Hamano
2024-04-10 19:39                           ` Olliver Schinagl [this message]
2024-04-12 13:35                   ` Phillip Wood
2024-04-06 17:07       ` Junio C Hamano
2024-04-06 19:19         ` Olliver Schinagl
2024-04-06 10:22     ` 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=0c9ad7f2-55e8-4763-8201-f29f15a39616@schinagl.nl \
    --to=oliver@schinagl.nl \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=lists@haller-berlin.de \
    --cc=phillip.wood123@gmail.com \
    --cc=phillip.wood@dunelm.org.uk \
    /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).