]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'js/parseopt-subcommand-autocorrection' into jch
authorJunio C Hamano <gitster@pobox.com>
Thu, 9 Apr 2026 18:22:16 +0000 (11:22 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 9 Apr 2026 18:22:16 +0000 (11:22 -0700)
The parse-options library learned to auto-correct misspelled
subcommand names.

* js/parseopt-subcommand-autocorrection:
  doc: document autocorrect API
  parseopt: add tests for subcommand autocorrection
  parseopt: enable subcommand autocorrection for git-remote and git-notes
  parseopt: autocorrect mistyped subcommands
  autocorrect: provide config resolution API
  autocorrect: rename AUTOCORRECT_SHOW to AUTOCORRECT_HINT
  autocorrect: use mode and delay instead of magic numbers
  help: move tty check for autocorrection to autocorrect.c
  help: make autocorrect handling reusable
  parseopt: extract subcommand handling from parse_options_step()

1  2 
Makefile
builtin/remote.c
help.c
meson.build
parse-options.c
t/meson.build

diff --cc Makefile
Simple merge
Simple merge
diff --cc help.c
Simple merge
diff --cc meson.build
Simple merge
diff --cc parse-options.c
index a676da86f5d617bd4a84d8301b77115eb62c3b19,0b84061a38115307cdcd97e9a703948a6b6d6fdd..4ecbb901f57bd138d00f0cc8b762ee240d336bc5
@@@ -5,8 -5,9 +5,10 @@@
  #include "gettext.h"
  #include "strbuf.h"
  #include "string-list.h"
 +#include "strmap.h"
  #include "utf8.h"
+ #include "autocorrect.h"
+ #include "levenshtein.h"
  
  static int disallow_abbreviated_options;
  
diff --cc t/meson.build
Simple merge