]> git.ipfire.org Git - thirdparty/git.git/commitdiff
SQUASH???
authorJunio C Hamano <gitster@pobox.com>
Mon, 27 Apr 2026 12:21:45 +0000 (21:21 +0900)
committerJunio C Hamano <gitster@pobox.com>
Mon, 27 Apr 2026 12:21:45 +0000 (21:21 +0900)
parse-options.c

index a1258134df72c7d02af00153bd2847f7d633265d..1a5feab5dd3f780cfc012c08df9a58123e64dc79 100644 (file)
@@ -647,7 +647,8 @@ static const char *autocorrect_subcommand(const char *cmd,
                                          struct string_list *cmds)
 {
        struct autocorrect autocorrect = { 0 };
-       unsigned int n = 0, best = 0;
+       unsigned int n = 0;
+       int best = 0;
        struct string_list_item *cand;
 
        autocorrect_resolve(&autocorrect);
@@ -657,7 +658,7 @@ static const char *autocorrect_subcommand(const char *cmd,
 
        for_each_string_list_item(cand, cmds) {
                if (starts_with(cand->string, cmd)) {
-                       cand->util = 0;
+                       cand->util = NULL;
                } else {
                        int edit = levenshtein(cmd, cand->string,
                                               0, 2, 1, 3) + 1;