Git development
 help / color / mirror / Atom feed
From: Ramsay Jones <ramsay@ramsayjones.plus.com>
To: Jiamu Sun <39@barroit.sh>
Cc: GIT Mailing-list <git@vger.kernel.org>,
	Junio C Hamano <gitster@pobox.com>
Subject: [PATCH] parse-options: fix sparse 'plain integer as NULL pointer'
Date: Thu, 23 Apr 2026 17:05:19 +0100	[thread overview]
Message-ID: <7aac2206-8b60-484f-a5f6-4943348ad3f6@ramsayjones.plus.com> (raw)


Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---

Hi Jiamu Sun,

If you need to re-roll your 'js/parseopt-subcommand-autocorrection'
branch, could you please squash this into the patch corresponding
to commit b9e6a2d30a ("parseopt: autocorrect mistyped subcommands",
2026-04-23).

Thanks.

ATB,
Ramsay Jones

 parse-options.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/parse-options.c b/parse-options.c
index d60e7bd3c9..14f3f385eb 100644
--- a/parse-options.c
+++ b/parse-options.c
@@ -658,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;
-- 
2.54.0

             reply	other threads:[~2026-04-23 16:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-23 16:05 Ramsay Jones [this message]
2026-04-24  2:47 ` [PATCH] parse-options: fix sparse 'plain integer as NULL pointer' Junio C Hamano
2026-04-26 12:14   ` Johannes Schindelin
2026-04-29  5:13     ` Jiamu Sun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7aac2206-8b60-484f-a5f6-4943348ad3f6@ramsayjones.plus.com \
    --to=ramsay@ramsayjones.plus.com \
    --cc=39@barroit.sh \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox