Article View: linux.kernel.git
Article #1726Re: [PATCH RFC 1/3] cat-file: extract the transport ownership from get_remote_info()
From: "Pablo Sabater"
Date: Wed, 28 Oct 2026 12:07
Date: Wed, 28 Oct 2026 12:07
59 lines
13555 bytes
13555 bytes
On Wed Oct 28, 2026 at 6:37 AM WET, Junio C Hamano wrote:
> "Pablo Sabater" <pabloosabaterr@gmail.com> writes:
>
>>>> + if (!transport->smart_options)
>>>> + die(_("smart options required"));
>>>
>>> Is this an end-user facing error message? I am not sure a user who
>>> saw this message can figure out what went wrong or how to correct
>>> it.
>>
>> I thought it would be better to say why it fails instead of a generic
>> error. If we drop the check it will die() later with "remote does not
>> support object-info".
>>
>> Since the smart options check only die()s when the remote is a bundle,
>> I could keep it and change the message to "object-info is not supported
>> on bundles".
>
> I am somewhat torn on this. It is certainly much better than the
> "smart options required" message, which the end user would not know
> how to act upon. However, that improvement only holds until we gain
> another transport other than bundle that also lacks support for
> "smart options". Saying something like "object-info is not
> supported by this remote." would avoid blindly mentioning "bundle"
> when the remote that lacks object-info support is actually not a
> bundle, but it loses the clarity your rewritten message provides
> when the problematic remote indeed is a bundle.
>
> Do we have the remote information at this point in the code (i.e., the
> URL of the remote that was given to the remote-object-info command)
> that the user would immediately recognize as the remote they asked
> the command to access? If so, "object-info is not supported by %s"
> filled with the remote information would probably work better.
We have what the user wrote for the remote in argv[0], so we could have
"object-info is not supported by <remote>", and it would be the same
for anything that sets smart_options to NULL.
But with that in mind, what if in the future there's a transport without
smart_options that does support object-info? The smart_options check is
there because of "this transport can't do object-info", and nothing
on the object-info path reads smart_options from what I checked.
So I'm going to drop that die(). Later in the code there's already a
check on transport_fetch_object_info(), which looks for
fetch_object_info in the transport's vtable. It's a bit later, but it
checks the real capability and it will give less trouble in the future.
Currently, it has a generic error but it can print a more detailed
version such as: "object-info is not supported by <remote>"
I'll send v2 later this week as I have to study for some of my midterms.
Regards,
Pablo
>
> Thanks.
Technical Details
Message-ID:
<DMGGJIMVUXEG.WJSWR3E4POW1@gmail.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-73645-linux-kernel-git=dewy.ruReferences:
<20261027-remote-object-info-batch-v1-0-ea7a1f0b1df1@gmail.com> <20261027-remote-object-info-batch-v1-1-ea7a1f0b1df1@gmail.com> <xmqqpkwvj7bj.fsf@gitster.g> <DMFX8JPX16W8.9VBEJMQVF998@gmail.com> <xmqqbj8ee3g1.fsf@gitster.g>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-73645-linux-kernel-git=dewy.ru
From: pabloosabaterr@gmail.com ("Pablo Sabater")
Newsgroups: linux.kernel.git
Subject: Re: [PATCH RFC 1/3] cat-file: extract the transport ownership from
get_remote_info()
Date: Wed, 28 Oct 2026 12:07:42 +0000
Organization: Usenet Network
Message-ID: <DMGGJIMVUXEG.WJSWR3E4POW1@gmail.com>
References: <20261027-remote-object-info-batch-v1-0-ea7a1f0b1df1@gmail.com>
<20261027-remote-object-info-batch-v1-1-ea7a1f0b1df1@gmail.com>
<xmqqpkwvj7bj.fsf@gitster.g> <DMFX8JPX16W8.9VBEJMQVF998@gmail.com>
<xmqqbj8ee3g1.fsf@gitster.g>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
logging-data="1765145"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:uJquWgvK83ZgjVGB/QZ8dpaBt+I= sha256:CuNAJ4qK4dd8+r7h4MAdGj+LE89JjfHGzHdhVfAYxs0=
sha1:cColfFkHNzZUTuf9ch7UyZH7Ajo= sha256:qONXEyf/Hh6TyPFNspSiygnkHdEQNwnS5XrDmm160oY=
List-ID: <git.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id B83DE125C35; Wed, 28 Oct 2026 15:08:55 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.048
X-Spam-Status: No, score=-3.048 tagged_above=-9999 required=6.31
tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25,
MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=gmail.com
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id dbUpkyEVv3Ix;
Wed, 28 Oct 2026 15:08:49 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=git+bounces-73645-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
by mail.dewy.ru (Postfix) with ESMTPS id A8C12125C32; Wed, 28 Oct 2026 15:08:39 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by sea.lore.kernel.org (Postfix) with ESMTP id 54EA727342; Wed, 28 Oct 2026 12:07:51 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1793189271;
b=QFgVvM+A1TOGf3REUYorBtXrmLYquV6IR5IM0C92oIIGvjXUFjxybHtU4RnH3sKPFvCe
en6GMWz+3P0TKDiQBtSBaRWOOVP7xy0U7RGVRI2+J7ez7BwQqcq+lzDo2+z+hpiWelwmN
0cAQxKvlCL45xWDE+CWVbrPlR+qdSeXbZZ7bXrVvRtVlp8EUZFEg93STfeoOehWPiehf5
KSh23SBIINlm4/E/YAB53ap3ppJ7+h7kR8kclqo01DK9tH0/wZU0R4TO0sOKH0Yct2Rxy
aYzEBeL9DM0T+V2xm/l4B2NEvJ1Bf0pBNYR50vPtSJUERpb8vlTc0+9WfMX3zCByyhg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793189271;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
Received:X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
List-Unsubscribe:List-Owner:Precedence:Mime-Version:
Content-Transfer-Encoding:Content-Type:Date:Message-Id:Cc:Subject:
From:To:X-Mailer:References:In-Reply-To;
bh=hjdsRdcyqReQmZjxrYmZOSdGGalELyiuqpF4pWyDnMg=;
b=KKfg/jmH5kUlkk0ngvHG0P+WOioXjfcl4Mma+JT7Ukl0prik5R/9FX9id5saHwo3cqqI
IIYxdVf9LN2zo8JgpgYWX7Y5yPzDD6WGlZ9buJNKBH05q053QxLm3kV+UKkYcYU74vSKg
8OscMMjKrWgybTmZW3ELAuAZF5XKiEOEnQ71+OKOibsZSIdl4HXB1CdSZfIRqoSjSI1S4
dNFzJtyktNCWBmr7wFSzsYwRjJEv2862gtkzq2j8I+X00c4IbM6JTt3JVCAe+KbUn4pwU
Xvz3e6x0Dy0UKSVVGls4jIE3r/8//Aoaq6elrT+AWYQyGUqk+0enB67j5+Xy5nRy5Lw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=s5DUCOhU;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id F0FA7606A321;
Wed, 28 Oct 2026 12:07:50 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=s5DUCOhU
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.42
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1793189270;
b=l08YYjGTCVKRuP03POrRngFzWlZdhlIGa+ypDeEsT7fhea8qJOGEsReBWVKoHB8Tnhd0
oSrmkYDB+8RK+0v3lVvrXGL1nE6ZEgtdPIJ5JAAgu1OqLneHSDTLT+1nGaRap8uhxsYqK
Oeii029+0oxLDX0psKVM+1LufcbmysyTM3rKqs03BjVeTFGwvEQld4KWrgMoKWQ7L6ZKX
ZxsuGnVWOhYKuP9DhqoN6N/BR9KZR0P+7YDODF51usrG2tViTj0vSc3DbqD1LyOvXP+Mr
pqHrMrehfR5Zv/3lUn5nvqZVZCVKBsAO1ABVKzTTV2oyb8PxdGyI/4hU0gYqN1XjRjw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793189270;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Gm-Message-State:X-Gm-Gg:X-Received:Received:Mime-Version:
Content-Transfer-Encoding:Content-Type:Date:Message-Id:Cc:Subject:
From:To:X-Mailer:References:In-Reply-To;
bh=hjdsRdcyqReQmZjxrYmZOSdGGalELyiuqpF4pWyDnMg=;
b=Il2HZiGeiuD8iMzxyqVJjNGN3hDrwUn4Htrf3KJm2WEHsEv4iNOTRJkl0XBJynR+5kwv
kJDxmycnejop0AJsjJqlq2/AbGuoJjnwJVtt2qnyn7H+7WldWFzutBYconc70SyPP4Sou
jF/ZXQsyLr6A0ILER4YAKM5Dm56QTjg+A+2nyC8HKHhKu4zRBzUm6AhWBek/Ow1Y0LwDB
fq7fXdfH1n9lLNMsdxquxrob3j41xmf2C/Z2SpKNpnKDPXtR8kUEivPBSrqLIr+82eX+m
NnYRxf+VwnUKe/lmzQ6vnpPUVSSN27kjthPag8Hsx3w7QGtGtBw8RbdaqDf8hRMMyHw==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=s5DUCOhU;
arc=none smtp.remote-ip=209.85.128.42
X-Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id B9F48606A31A
for <git@vger.kernel.org>; Wed, 28 Oct 2026 12:07:49 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org B9F48606A31A
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-4a4d7ae1ae9so7623875e9.1
for <git@vger.kernel.org>; Wed, 28 Oct 2026 05:07:49 -0700 (PDT)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20260707; t=1793189268; x=1793794068; darn=vger.kernel.org;
h=in-reply-to:references:to:from:subject:cc:message-id:date
:content-type:content-transfer-encoding:mime-version:from:to:cc
:subject:date:message-id:reply-to:content-type;
bh=hjdsRdcyqReQmZjxrYmZOSdGGalELyiuqpF4pWyDnMg=;
b=s5DUCOhU2FyqMnnuMtDfRM90NGC12mfUj+m2U+peJInyF+7KzrYH23AqpALoNNj3E9
U0rrVV7N/TnvnWbxI+NddOME+ZmBIn8HAvmOlkzC/nPuLBb639JAaz5akB0oxeEdzEfZ
RAwti1ZeWNA6Cibl04txxMCW6R/c+HxYUoo6IZ3F3iJxUkaoykGLY9kGQT7YC7pqNmB0
7uXEm98PrOLII4gOBkHPwyPuGf9KjNcqr/bq69SJnFir3lRMCbKmVmrDFw+SMSq/LReB
CAPv/S3AKsFQfAJFaAc4DQoqVqxKDrDzbhyMMVtK640ftYE49fHb5x6cWOKOd4vnLnpG
265A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1793189268; x=1793794068;
h=in-reply-to:references:to:from:subject:cc:message-id:date
:content-type:content-transfer-encoding:mime-version:x-gm-gg
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
:content-type;
bh=hjdsRdcyqReQmZjxrYmZOSdGGalELyiuqpF4pWyDnMg=;
b=ZtGmVlH5Fu1tsJkITHXsvn/gxAiOCuN0HRPPwiwzZdDXxbSfAxEtpwGZFt3DE1Xj+g
wMsuCWRXSVlbWLcSjXOz/lKKKMV1L+PvpYt+F1IEcN1wVxwaRy+Q/EgjB1fCf10IEdYL
VTd/O4OWaNdiyibE3qoNPlSOYfdXt/dOOppnd46/wEN2i/hsRxXgiCI4arSoEneB+jed
0zWVHVaLHwD1Cyo0VH3igW6Ac6CbwMRDnEtzEZ69R3zR7x9QiJFBe5O1JHkpKG++jq/v
zW86EVyFaIxBBxm8QkX2beNIFvGgY/xHBTzNI4gfDPj+oswl6NuUrBvfOru5kdL0U0cY
tVHg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PDT)
X-Received: from localhost ([2001:818:c665:a700:b017:4479:7c99:e3fb])
by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a97c42ca77sm39573455e9.8.2026.10.28.05.07.43
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 28 Oct 2026 05:07:45 -0700 (PDT)
X-Mailing-List: git@vger.kernel.org
X-List-Post: <mailto:git@vger.kernel.org>
X-List-Help: <mailto:git+help@vger.kernel.org>
X-List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:git+owner@vger.kernel.org>
X-Precedence: list
X-Cc: <git@vger.kernel.org>
X-Mailer: aerc 0.21.0
X-In-Reply-To: <xmqqbj8ee3g1.fsf@gitster.g>