All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Andrew Au <cshung@gmail.com>,  git@vger.kernel.org
Subject: Re: [PATCH v4] transport-helper, connect: use clean_on_exit to reap children on abnormal exit
Date: Mon, 16 Mar 2026 13:31:08 -0700	[thread overview]
Message-ID: <xmqq4imfo6sz.fsf@gitster.g> (raw)
In-Reply-To: <20260314160814.GA918806@coredump.intra.peff.net> (Jeff King's message of "Sat, 14 Mar 2026 12:08:14 -0400")

Jeff King <peff@peff.net> writes:

> I don't know if you want to apply it separately (since it's really a
> totally different topic) or on top (since it is only the application of
> Andrew's patch which lets us find the problem).
> ...
>  transport.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/transport.c b/transport.c
> index 107f4fa5dc..2fb4767821 100644
> --- a/transport.c
> +++ b/transport.c
> @@ -54,14 +54,14 @@ static int transport_color_config(void)
>  		return 0;
>  	initialized = 1;
>  
> -	if (!repo_config_get_string(the_repository, key, &value))
> +	if (!repo_config_get_string_tmp(the_repository, key, &value))
>  		transport_use_color = git_config_colorbool(key, value);
>  
>  	if (!want_color_stderr(transport_use_color))
>  		return 0;
>  
>  	for (size_t i = 0; i < ARRAY_SIZE(keys); i++)
> -		if (!repo_config_get_string(the_repository, keys[i], &value)) {
> +		if (!repo_config_get_string_tmp(the_repository, keys[i], &value)) {
>  			if (!value)
>  				return config_error_nonbool(keys[i]);
>  			if (color_parse(value, transport_colors[i]) < 0)

Regardless of where it goes, we need to change a bit more, it seems?

    CC transport.o
transport.c: In function 'transport_color_config':
transport.c:57:62: error: passing argument 3 of 'repo_config_get_string_tmp' from incompatible pointer type [-Wincompatible-pointer-types]
   57 |         if (!repo_config_get_string_tmp(the_repository, key, &value))
      |                                                              ^~~~~~
      |                                                              |
      |                                                              char **
In file included from transport.c:5:
config.h:644:62: note: expected 'const char **' but argument is of type 'char **'
  644 |                                const char *key, const char **dest);
      |                                                 ~~~~~~~~~~~~~^~~~
transport.c:64:74: error: passing argument 3 of 'repo_config_get_string_tmp' from incompatible pointer type [-Wincompatible-pointer-types]
   64 |                 if (!repo_config_get_string_tmp(the_repository, keys[i], &value)) {
      |                                                                          ^~~~~~
      |                                                                          |
      |                                                                          char **
config.h:644:62: note: expected 'const char **' but argument is of type 'char **'
  644 |                                const char *key, const char **dest);
      |                                                 ~~~~~~~~~~~~~^~~~
gmake: *** [Makefile:2815: transport.o] Error 1


I'll squash an obvious patch in.

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

diff --git c/transport.c w/transport.c
index 358bc38585..7985b42a74 100644
--- c/transport.c
+++ w/transport.c
@@ -47,7 +47,7 @@ static int transport_color_config(void)
 		"color.transport.reset",
 		"color.transport.rejected"
 	}, *key = "color.transport";
-	char *value;
+	const char *value;
 	static int initialized;
 
 	if (initialized)

  parent reply	other threads:[~2026-03-16 20:31 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-23 16:51 [PATCH 0/1] Fix zombie children when git is PID 1 in containers Andrew Au
2026-02-23 16:51 ` [PATCH 1/1] transport-helper, connect: add atexit handler to reap children on abnormal exit Andrew Au
2026-02-23 17:14   ` Kristoffer Haugsbakk
2026-02-23 18:12     ` Andrew Au
2026-03-11 14:20 ` [PATCH v2] " Andrew Au
2026-03-11 17:58   ` Junio C Hamano
2026-03-11 18:19     ` Andrew Au
2026-03-11 19:38       ` Junio C Hamano
2026-03-11 18:42   ` Jeff King
2026-03-12 19:55     ` [PATCH v3] transport-helper, connect: use clean_on_exit " Andrew Au
2026-03-12 20:40       ` Jeff King
2026-03-12 20:41         ` Jeff King
2026-03-12 20:49       ` Junio C Hamano
2026-03-12 21:49     ` [PATCH v4] " Andrew Au
2026-03-12 22:04       ` Junio C Hamano
2026-03-14 16:08         ` Jeff King
2026-03-14 17:24           ` Junio C Hamano
2026-03-16 20:31           ` Junio C Hamano [this message]
2026-03-16 21:19             ` Jeff King
2026-03-16 21:24               ` Junio C Hamano
2026-03-11 21:15 ` [PATCH 0/1] Fix zombie children when git is PID 1 in containers brian m. carlson
2026-03-12 19:40   ` Andrew Au

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=xmqq4imfo6sz.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=cshung@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.