From: Olliver Schinagl Date: Thu, 28 Mar 2024 08:01:03 GMT Subject: Re: Allow git bisect to auto-skip Message-ID: In-Reply-To: On 27-03-2024 20:24, Junio C Hamano wrote: > Olliver Schinagl writes: > >> Anyway, want I was thinking of, based a key somewhere in the message >> body (GIT_BISECT_SKIP=1 for example), mark the commit in the list to >> be skipped, as `git bisect skip` would. This so the skipped commit >> actualyl ends up on the list of skipped commits >> (`refs/bisect/skip-*`). > I think it is very unlikely that we'd adopt any hardcoded scheme > that allows only one supported way of marking commits as not to be > tested. Certainly not the kind that the committer is forced to know > the commit must be skipped during a bisection session before > creating the commit. My goal is to make things work as automagically as possible, without special tooling or scripts. This to make the barrier for entry as low as possible. E.g. if someone says 'could you please bisect this for me', things should just work. Having said that, I also realize that the use-cases where a commit message would be enough are limited. There's only a very rare cases where it is known before hand a commit will break bisect. The `GIT_BISECT_SKIP=1` would obviously be configurable, so it could be set on a per-repo level, with a sane default, and probably wiser to use `git commit --skip-bisect` to make use of said flag. Having said all that, right now, I'm just exploring how things work, how easy it would be, how logical it would be. So for thank you for bearing with me :) > So I am not sure how much good it will do to > know that commit_list->item is a commit object on the list, or > calling repo_get_commit_buffer() on it would give the contents of > the commit object. > > Knowing that commit_list->item->object.oid is the object name of > such a commit, and calling oid_to_hex() on such an object name > stringifies it, should be sufficient to write a new code that calls > out to a script specified via "git bisect --skip-when=