]> git.ipfire.org Git - thirdparty/git.git/commitdiff
doc: document autocorrect API
authorJiamu Sun <39@barroit.sh>
Thu, 23 Apr 2026 01:38:00 +0000 (10:38 +0900)
committerJunio C Hamano <gitster@pobox.com>
Thu, 23 Apr 2026 02:02:29 +0000 (11:02 +0900)
Explain behaviors for autocorrect_resolve(), autocorrect_confirm(), and
struct autocorrect.

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

index 14ee7c4548d3f79e041b9356efb957078014284f..5bb67cf6debdf4e6414e954608728d27d47de376 100644 (file)
@@ -13,13 +13,24 @@ enum autocorrect_mode {
        AUTOCORRECT_DELAY,
 };
 
+/**
+ * `mode` indicates which action will be performed by autocorrect_confirm().
+ * `delay` is the timeout before autocorrect_confirm() returns, in tenths of a
+ * second. Use it only with AUTOCORRECT_DELAY.
+ */
 struct autocorrect {
        enum autocorrect_mode mode;
        int delay;
 };
 
+/**
+ * Resolve the autocorrect configuration into `conf`.
+ */
 void autocorrect_resolve(struct autocorrect *conf);
 
+/**
+ * Interact with the user in different ways depending on `conf->mode`.
+ */
 void autocorrect_confirm(struct autocorrect *conf, const char *assumed);
 
 #endif /* AUTOCORRECT_H */