git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Phillip Wood <phillip.wood123@gmail.com>
To: Olliver Schinagl <oliver@schinagl.nl>,
	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: Sat, 6 Apr 2024 14:50:29 +0100	[thread overview]
Message-ID: <4bedcad2-218a-4b16-88a7-cc70cc126af3@gmail.com> (raw)
In-Reply-To: <b194ba7c-454b-494f-bef2-e9eac7ca87f1@schinagl.nl>

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:
>>
>>> Hey all,
>>>
>>> I've also got my work on a branch in my repo, if that helps to look at
>>> things, https://gitlab.com/olliver/git/-/tree/skip_bisect
>>>
>>> Also included is a script to be used as an example. I opted to use
>>> `git show`, which is nice because it works both on commits, but also
>>> on notes.
>>>
>>> Anyway, any thoughts on the bellow before I send the full series?
>>>
>>> Olliver
>>
>> I would not write get_skip_when() before studying the same file to
>> see if there already is a helper to read the whole file used in the
>> vicinity (like strbuf_read_file(), perhaps).
> 
> Fair enough. I'm a little worried about optimization vs readability. I 
> think it makes it mre clear what the code does in its current form; but 
> I'll investigate. Bisecting shouldn't be a computational often happening 
> thing, so I'm not to worried about performance. But I'm not too familiar 
> with the git code base, so I don't know either :p

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.

>>
>> I do not have enough concentration to follow changes to
>> bisect_auto_next() is reasonable.  Especially I do not know why
>> "bisect-skip_when" wants to exist and what it is trying to do,
>> besides the fact that its name looks horrible ;-).
>>
> naming things, sure. I can look into this absolutly :)

For me it's not just the name but the whole hook thing - do we really 
need that rather than just the command line option?

The other thing I wondered about is the exit code handling for the 
"--skip-when" script. In Junio's example in an earlier message he used a 
successful exit to mean "skip this commit" and an unsuccessful exit to 
mean "test this commit". To me that matches the name of the option - we 
skip when the script given to "--skip-when" is successful. Copying the 
mechanism used by "git bisect run" seems a bit cumbersome as we only 
need to know whether to skip or not, we don't need a special way of 
distinguishing "skip this commit" from "this commit is good" and "this 
commit is bad"

Best Wishes

Phillip

> But in short, bisect_auto_next was returning just after checkout It 
> seemed. So after checkout, running the script seemed sensible. But I 
> look at it as a normal git user. So you checkout, test your commit, skip 
> to the next one if applicable.
> 
> 
> I'll think of your two comments, and see if I can address them as you 
> regain your concentration :p
> 
> But seeing that these are your main concerns, I'm more confident I'm not 
> completly on the wrong path here.
> 
> Olliver
> 


  reply	other threads:[~2024-04-06 13:50 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 [this message]
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
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=4bedcad2-218a-4b16-88a7-cc70cc126af3@gmail.com \
    --to=phillip.wood123@gmail.com \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=lists@haller-berlin.de \
    --cc=oliver@schinagl.nl \
    --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).