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é