Thread (380 messages) 380 messages, 13 authors, 2026-07-24

Re: [PATCH v10 7/8] transport: add client support for object-info

From: Jeff King <hidden>
Date: 2025-02-01 02:08:08

On Mon, Jan 13, 2025 at 09:14:59PM -0500, Eric Ju wrote:
quoted hunk ↗ jump to hunk
@@ -464,8 +465,33 @@ static int fetch_refs_via_pack(struct transport *transport,
 	args.server_options = transport->server_options;
 	args.negotiation_tips = data->options.negotiation_tips;
 	args.reject_shallow_remote = transport->smart_options->reject_shallow;
+	args.object_info = transport->smart_options->object_info;
+
+	if (transport->smart_options && transport->smart_options->object_info
Coverity complains about the check for a NULL transport->smart_options
here. If it's NULL we'd already have segfaulted a few lines above when
we look at the reject_shallow flag.

Not sure if that's an existing bug in the earlier code or not. ;) Your
extra check can't hurt anything, in the sense that it's just being
overly defensive, but it does make puzzling out the expected value of
smart_options harder.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help