]> git.ipfire.org Git - thirdparty/git.git/commit
autocorrect: provide config resolution API
authorJiamu Sun <39@barroit.sh>
Thu, 23 Apr 2026 01:37:56 +0000 (10:37 +0900)
committerJunio C Hamano <gitster@pobox.com>
Thu, 23 Apr 2026 02:02:14 +0000 (11:02 +0900)
commit0df5897d286706992a48ccbffa0ce6acf2cbca8b
tree40ee7902573a0cfde8f148877185b34efc67ce39
parent01e68aca69017f3a8d65e6e1d4ddd0d4a4bdc558
autocorrect: provide config resolution API

Add autocorrect_resolve(). This resolves and populates the correct
values for autocorrect config.

Make autocorrect config callback internal. The API is meant to provide
a high-level way to retrieve the config. Allowing access to the config
callback from outside violates that intent.

Additionally, in some cases, without access to the config callback, two
config iterations cannot be merged into one, which can hurt performance.
This is fine, as the code path that calls autocorrect_resolve() is cold.

Signed-off-by: Jiamu Sun <39@barroit.sh>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
autocorrect.c
autocorrect.h
help.c