On Wed, 15 Jan 2025 at 09:51, Kristoffer Haugsbakk <kristofferhaugsbakk@xxxxxxxxxxxx> wrote: > > On Wed, Jan 15, 2025, at 10:36, Chris Howlett via GitGitGadget wrote: > > From: Chris Howlett <chowlett09@xxxxxxxxx> > > > > The help.autocorrect functionality is really useful, saving frustration > > when a dev fat-fingers a command, and git has a pretty good idea what > > was originally intended. The config settings are a nice selection, with > > "prompt" asking the user to confirm that they want to run the assumed > > command. > > > > However, with "prompt", the choice defaults to "No" - that is, hitting > > return will _not_ run the command. For me at least, if git is confident > > it knows which command I wanted, it's usually right, and the golden path > > would be to run the command. > > > > Therefore this patch adds "prompt-yes" as a counterpart config setting > > for help.autocorrect, which does the same as "prompt", but defaults to > > "Yes" - hitting return will run the assumed command. > > > > I have not added any tests because the test suite doesn't have any tests > > (that I could find) for the "prompt" behaviour - I'm assuming this is > > because it's hard/impossible to simulate the interactive terminal prompt > > > > Signed-off-by: Chris Howlett <chowlett09@xxxxxxxxx> > > This seems to conflict with the patch “help: interpret boolean string > values for help.autocorrect” which is in `seen`. The latest version (I > don’t know what version is applied right now): > > https://lore.kernel.org/git/pull.1869.v4.git.git.1736760824201.gitgitgadget@xxxxxxxxx/ That's unsurprising, as I was inspired to add this option after reading that committer's blog post on help.autocorrect - https://blog.gitbutler.com/why-is-git-autocorrect-too-fast-for-formula-one-drivers/ I'm happy to wait for their patch to be merged, then rebase and rework against it, if that seems the most sensible option? Presumably I'll have to monitor the mailing list to learn when that happens? This is my first patch to git, so I'm not sure of process.