Re: git bisect bad @
- From
Ramkumar Ramachandra <r@artagnon.com>
- Date
- Jan 14, 2022, 08:04 UTC
- Message-ID
- <e90803fb-00a1-4575-9a8b-8f7fed7f5e6a@www.fastmail.com>
- In-Reply-To
- <88899d16-5e3e-2bb2-07e9-59f7607c91a8@web.de>
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?
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. 2. If argv[0] is found in the current directory, prompt for "Did you mean ... [Y/n]?" 3. If checking on merge-base fails, improve the error message with "Perhaps your bisect script is broken?" and reset bisect automatically.
Warm regards, Ram