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

Re: git bisect bad @

From
René Scharfe <l.s.r@web.de>
Date
Jan 18, 2022, 12:45 UTC
Message-ID
<b5c85f32-eaea-a5f9-c648-5bdbe1c5cd62@web.de>
In-Reply-To
<e90803fb-00a1-4575-9a8b-8f7fed7f5e6a@www.fastmail.com>
Am 14.01.22 um 09:04 schrieb Ramkumar Ramachandra:
Show 9 quoted lines
> René Scharfe wrote:
>> Using the shell allows the bisect run command to be any shell command,
>> not just some script.  E.g. you could bisect a build failure with just
>> "git bisect run make".  Quite useful.
>
> Ah, that's quite useful, yes. The problem of improving user
> experience with bisect is getting more and more hairy. May I suggest
> something tractable, albeit not too elegant, and certainly not
> perfect, in view of improving user experience in common use cases?
I like the pragmatism.
> 1. If argv[0] of the supplied command is found in $PATH, check it for
> executable permissions. Otherwise, error out. It's highly unlikely
> that the user meant a shell builtin, which would supersede the
> executable in $PATH.

Installing something in $PATH and forgetting to make it executable sounds like a very rare case. And if we find such a thing, would it warrant erroring out? What if there is an executable version somewhere else in the $PATH or a shell builtin or an alias?

> 2. If argv[0] is found in the current directory, prompt for "Did you
> mean ... [Y/n]?"

That is more likely, I imagine, but is the existence of such a file strong enough a signal to interrupt the program? I think we are better off making sure there actually is a problem first.

> 3. If checking on merge-base fails, improve the error message with
> "Perhaps your bisect script is broken?" and reset bisect
> automatically.

That would have no effect if the bad commit is a straight descendant of the good one. And a merge base being bad can have other causes than a missing script.

René
Previous: Ramkumar RamachandraNext: Junio C Hamano
Message 18 of 31 in “git bisect bad @”
  1. Ramkumar RamachandraJan 9, 2022
  2. Junio C HamanoJan 9, 2022
  3. Ramkumar RamachandraJan 9, 2022
  4. bisect: report actual bisect_state() argument on errorRené Scharfe, Jan 10, 2022
  5. Ramkumar RamachandraJan 10, 2022
  6. Junio C HamanoJan 10, 2022
  7. Ramkumar RamachandraJan 10, 2022
  8. René ScharfeJan 12, 2022
  9. Junio C HamanoJan 12, 2022
  10. René ScharfeJan 12, 2022
  11. René ScharfeJan 13, 2022
  12. Ramkumar RamachandraJan 13, 2022
  13. Christian CouderJan 13, 2022
  14. René ScharfeJan 13, 2022
  15. Ramkumar RamachandraJan 13, 2022
  16. René ScharfeJan 14, 2022
  17. Ramkumar RamachandraJan 14, 2022
  18. René ScharfeJan 18, 2022
  19. Junio C HamanoJan 14, 2022
  20. Junio C HamanoJan 13, 2022
  21. 1/4 bisect--helper: report actual bisect_state() argument on errorRené Scharfe, Jan 18, 2022
  22. 2/4 bisect--helper: release strbuf and strvec on run errorRené Scharfe, Jan 18, 2022
  23. 3/4 bisect: document run behavior with exit codes 126 and 127René Scharfe, Jan 18, 2022
  24. 4/4 bisect--helper: double-check run command on exit code 126 and 127René Scharfe, Jan 18, 2022
  25. Junio C HamanoJan 19, 2022
  26. René ScharfeJan 19, 2022
  27. Junio C HamanoFeb 4, 2022
  28. René ScharfeFeb 4, 2022
  29. Ramkumar RamachandraFeb 4, 2022
  30. Junio C HamanoFeb 4, 2022
  31. Ramkumar RamachandraFeb 4, 2022

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.