git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Olliver Schinagl <oliver@schinagl.nl>
To: phillip.wood@dunelm.org.uk, Junio C Hamano <gitster@pobox.com>
Cc: 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: Sun, 7 Apr 2024 16:52:37 +0200	[thread overview]
Message-ID: <2542ebd6-11ce-496b-b10b-b55c3a211705@schinagl.nl> (raw)
In-Reply-To: <d10bd772-2cf1-4838-bec2-ea2a639cabab@gmail.com>

Hey Phillip,

On 07-04-2024 16:09, phillip.wood123@gmail.com wrote:
> On 06/04/2024 20:17, Olliver Schinagl wrote:
>> Hey Phillip,
>>
>> On 06-04-2024 15:50, Phillip Wood wrote:
>>> Hi Olliver
>>>
>>> On 06/04/2024 11:06, Olliver Schinagl wrote:
>>>> On 06-04-2024 03:08, Junio C Hamano wrote:
>>>>> Olliver Schinagl <oliver@schinagl.nl> writes:
>>> If you search builtin/bisect.c you'll see some existing callers of 
>>> strbuf_read_file() that read other files like BISECT_START. Those 
>>> callers should give you an idea of how to use it.
>>
>> Yeah, I found after Junio's hint :) What threw me off, as I wrote 
>> earlier, get_terms(). I wonder now, why is get_terms() implemented as 
>> it is, and should it not use the same functions? Or is it because 
>> terms is a multi-line file, whereas the others are all single line (I 
>> didn't look, though I see addline functions for the strbuf functions. 
>> Should this be refactored?
> 
> get_terms() wants to read the first line into `term_bad` and the second 
> line into `term_good` so it makes sense that it uses two calls to 
> `strbuf_getline()` to do that. It does not want to read the whole file 
> into a single buffer as we do here.

Right, but I why not use strbuf_getline()?

> 
>> So with the name, I started to think some more about it, and after 
>> playing with some names, I settled on 'bisect-post-checkout'. Things 
>> then sort of fell more into place. It is still a hook/commandline 
>> option, but it's a much smaller change (since we don't have any 
>> special code to check the exit code anymore) as we can (obviously) run 
>> `git bisect skip` instead of `exit 125` as well of course.
> 
> Does that mean you will be starting "git bisect skip" from the script 
> run by the current "git bisect" process. I don't think calling git 
> recursively like that is a good idea as you'll potentially end up with a 
> bunch of "git bisect" processes all waiting for their post checkout 
> script to finish running.

Well the process is inherently recursive, though that's up to the user 
depending on what they put in their script of course. I don't think git 
is 'waiting' is it? In that, git bisect runs the command, the command 
runs git bisect, git bisect stores the commit hash in the skip file and 
'exists', which goes then back to the bisect job, which then continues 
as it normally would.

So technically, we're not doing anything bad in git, but a user might do 
something bad.

Thank you,

Olliver

> 
> Best Wishes
> 
> Phillip


  reply	other threads:[~2024-04-07 14:52 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 [this message]
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
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=2542ebd6-11ce-496b-b10b-b55c3a211705@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.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).