git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC] bisect: Introduce skip-when to automatically skip commits

From
Olliver Schinagl <oliver@schinagl.nl>
Date
Apr 10, 2024, 19:39 UTC
Message-ID
<0c9ad7f2-55e8-4763-8201-f29f15a39616@schinagl.nl>
In-Reply-To
<xmqqle5lrp46.fsf@gitster.g>
On 10-04-2024 21:31, Junio C Hamano wrote:
Show 9 quoted lines
> 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).

Show 5 quoted lines
> 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.
> 
> 
Previous: Junio C HamanoNext: Phillip Wood
Message 16 of 20 in “[RFC] bisect: Introduce skip-when to automatically skip commits”
  1. Olliver SchinaglMar 30, 2024
  2. Olliver SchinaglApr 5, 2024
  3. Junio C HamanoApr 6, 2024
  4. Olliver SchinaglApr 6, 2024
  5. Phillip WoodApr 6, 2024
  6. Olliver SchinaglApr 6, 2024
  7. phillip.wood123@gmail.comApr 7, 2024
  8. Olliver SchinaglApr 7, 2024
  9. phillip.wood123@gmail.comApr 7, 2024
  10. Olliver SchinaglApr 7, 2024
  11. Junio C HamanoApr 8, 2024
  12. Olliver SchinaglApr 10, 2024
  13. Junio C HamanoApr 10, 2024
  14. Olliver SchinaglApr 10, 2024
  15. Junio C HamanoApr 10, 2024
  16. Olliver SchinaglApr 10, 2024
  17. Phillip WoodApr 12, 2024
  18. Junio C HamanoApr 6, 2024
  19. Olliver SchinaglApr 6, 2024
  20. Olliver SchinaglApr 6, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.