Article View: linux.kernel.git
Article #1686Re: [PATCH RFC 1/3] cat-file: extract the transport ownership from get_remote_info()
From: "Pablo Sabater"
Date: Tue, 27 Oct 2026 21:00
Date: Tue, 27 Oct 2026 21:00
40 lines
12302 bytes
12302 bytes
On Tue Oct 27, 2026 at 7:02 PM WET, Junio C Hamano wrote:
> Pablo Sabater <pabloosabaterr@gmail.com> writes:
>
>> get_remote_info() receives the name of the remote and from there it
>> builds the transport and at the end closes it.
>>
>> To be able to reuse the connection for multiple batches in a subsequent
>> commit, it is needed to extract that responsibility from
>> get_remote_info() and instead have it in its caller,
>> parse_cmd_remote_object_info(), which will handle the batches.
>
> Makes sense.
>
>> While at it, rename the transport variable 'gtransport' to 'transport',
>> as it looks like a global when it's not.
>
> Good move. We started (not particularly this program but the
> transport layer in general) with a global instance of transport
> object called gtransport, but the ones that we create on demand and
> release after we are done are of course local and it is misleading
> to use such a prefix.
>
>> + 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".
Regards,
Pablo
Technical Details
Message-ID:
<DMFX8JPX16W8.9VBEJMQVF998@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-73569-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>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-73569-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: Tue, 27 Oct 2026 21:00:01 +0000
Organization: Usenet Network
Message-ID: <DMFX8JPX16W8.9VBEJMQVF998@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>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
logging-data="1632325"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:kZxqRIu+D4i00J6oxb7rTSRg1DU= sha256:psPVkUWPJUDd5aykTQZMjRqMC7AvmAcsDl/givyJqPA=
sha1:L9Rj6tWMSEAKwL6wLMBlsbzHqQI= sha256:w+9kje/WMXsdHJjM7bIaDfBHlwrnoP7M4ZhIGL5U3GI=
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 60481125B0B; Wed, 28 Oct 2026 00:00:49 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -2.048
X-Spam-Status: No, score=-2.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, FORGED_GMAIL_RCVD=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 DHDchW5vsihh;
Wed, 28 Oct 2026 00:00:47 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=git+bounces-73569-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 B3624125C20; Wed, 28 Oct 2026 00:00:38 +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 0A7E12C7A3; Tue, 27 Oct 2026 21:00:07 +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=1793134806;
b=YBz3ilMLLHIVsMX3PkK/gK23In+O6zk3FhtZFJ5rFd/7cgt81xRxThvFTvxuP8qCbeOn
181NjybYGqHl4DZsRzq6P69C9DEjFxJat0d3o4/WOXND6u/6kfdWLFnwAbBThadAhIww7
YxYdiHB3aBSaprXAT3t3/ABMciCPuH/6H8HQjA2Wjef0z7CnI6Qg2gRg0GLgYlkeflVnc
EY8HHp8PiIr7In0O5PJcp+rIJhuuWDWLiGiXkSucrEjlaRiqqLsVLBI3newP+kq4DhxCR
cpPg/j1jby4cjv4FWW3eiPnBfs5gmTeZagZ17+sA7YVeQwzwKqQGs2acUcwM87xVYGQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793134806;
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=ABh6/zfgsGd9pABZ6nCZg8heyBHiBQRIdpTyD/2eIV4=;
b=FUcZ+fZoLwNatwRqhsLBJ13Pc3okF9NqtfnaUFqEr+QzmBu/c05R1V7CUPRnzdQnKFbn
HnAxcZ3naWNPxU59OjfKHDhTjoHnv6UhsDpfEHvdWVxbMCVWEdEjK0b173ijAosMWuHIc
WHUF2mjf9jcYqHXtZhNdVOus80GZVqhHMPYHb0s7fV7eGJlhr1ux9KZItEKolHuqpVPtr
lxKNz2DX56aXoXKkaYi9/unTf24fbmVyJL2NQqbzXF3ZTZrXeC209/bPRU3cTR2LTRSzT
Qvd0c6TJwY4r1kAdsfLqrp/qcPzEMn+wK4Xcu+kPx7FeYN9iEmv6SJ6ZpcekXW1xY0A==
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=J0PLg1jv;
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 D67F0606A324;
Tue, 27 Oct 2026 21:00:06 +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=J0PLg1jv
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.47
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1793134806;
b=fObqAEO1TXXHvshOlvKL+/HXVmU/E1ol8TRNHpouW3P4PF2XL21nb5Wu5ES6IBZmmmjh
qBI7Ukx6fN/zTamBVXkwF0wE/3ytKwT9e8gbBXJrnIJWhWkllKVFnAfHjTqte9qUl7Bi4
m43GqUV3aHTlFwm4d8fooAvrnwDmM6KwCqslU6SUzJRpEowuf5UlEesfZnySpoQYj7CDC
qQZVGDpeGvmf/uO4LiZAvsIN20SnqV7Yt6O+7N1B/cEO1WatiKhyQY3We72FBj9hMLrD1
kxeG0anFS0Jca0hgNNuYzfZ+r2EySfgtX2WOGr7FEg+CcpLjS83NS+P5KwUwYu2YZJw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793134806;
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=ABh6/zfgsGd9pABZ6nCZg8heyBHiBQRIdpTyD/2eIV4=;
b=guwS9sxnfqRb3OyoiiLGE1IRhiM38+3ZLHPNURt3nMXcobmw46s9xr2odGz1Nup6k0bd
9WlkFZpkz8AQ2D1EhKCmbMyzH0WEn6nhEQT+BI0h8wKq96N335P0PSnWp4wGqnWDbt9W3
WWu2UXWvqbg4fl8fxIPAuWfJj5NbRIz/DQRZpZV5x5Uvm0DP8IPRixKpDvXfXfxgMnXua
8/dfC0735ItZbQ/BFdKxitUdHngadukw360gb0IrEW+0QtEU/S64jpomvejTpuoHOrQUT
J7fND5NgFhw+/7NBoqimesuQHq07ihXZZigselCsuJmrVllZdh0lWF2RQqH1NPUuiPQ==
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=J0PLg1jv;
arc=none smtp.remote-ip=209.85.221.47
X-Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47])
(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 A7270606A31F
for <git@vger.kernel.org>; Tue, 27 Oct 2026 21:00:05 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org A7270606A31F
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-wr1-f47.google.com with SMTP id ffacd0b85a97d-48e46e449e8so175491f8f.3
for <git@vger.kernel.org>; Tue, 27 Oct 2026 14:00:05 -0700 (PDT)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20260707; t=1793134804; x=1793739604; 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=ABh6/zfgsGd9pABZ6nCZg8heyBHiBQRIdpTyD/2eIV4=;
b=J0PLg1jvxpEI3uqT+hBOYMDxgEdm7lAL0GDPwstMXF0axE1wp7RTwEavyj5Jw9d2iQ
HDErE00MBIQJij9yQFt9iVsdmMxDlI7B63SRgEu3Bny2bQXh/tRRiokxNO8f376kuKdQ
A3SB+glgulZ3nEmYlwtcXjf1iZlZO1+bZ4B1M1XQel9e9Q0YtJj83VvLxVVpQV1W22vd
/afmXCi6Sb5Rx2z1ZIfSQToxIjxqTQJKdfWtagFi8DUPR7+qYuTxaZvUWShzljm4YoZ5
bYoCjx7QTj5tzQvkXIW8Y/KUWRKnxdR/iC4CWizzx32cCABp6sor+S3UryWlcZ90qRS3
/Kew==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1793134804; x=1793739604;
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=ABh6/zfgsGd9pABZ6nCZg8heyBHiBQRIdpTyD/2eIV4=;
b=DdYwZ3HPYzIAJGSlI/swEtcnhCJr79/qTWhz8312ZLarGr5aFGAeJyCU62BPsHxR3h
zO2P1YRYzHiWfJogpKVINYDAp/05/7JIwVQFhbqKef2wjlcUXDvETjZW46wI19zfRIii
Xix72siLo8i5CF3Yr8nQsywCuSt3+nsJatrOF3Xz8OgTkkN8JIrzbZwQcoHo045ZI8XB
smsNgRi9YUUZ3r42+0tRpZFV/ryvYwbw6pkjMU815ecIYmxvJ0Pt/WGseWNDDj22jlIs
GrJoKdhlSm27d2LePrX5JsDpbYrfevMOjJyazf391jfryEXiOhNuhuS8AHr6n7fKRqce
auGw==
X-Gm-Message-State: AFq9FYItd/ZTV7iwptvXAIT4rCXIGe9mlpIgr+8u8M7aclYIVnBbyXdd
vwBc+3lI7re13e4RT5mDmdO/D65t7f7Nx0vODA4AxaO6nin476l9qcKz
X-Gm-Gg: AYBFou32HrgNf4qoAX3RFoy9jOEpbUPEtgoWvIMhpm9tvH5cCwotzV4t+50yEq7Cup8
as9xjWX4siNGNFIOXsPEuJEg4NPf/P0vIUI/2ZVA3gpIIloAg4XmvDGdIQR6ethi3nkMpOCXLR+
68r5UfwcsgWqiLILiLUm+8Fo1dXPGcCHF4Cgc+6mFccht82L027peSJe99tdBCVR3d9ilkCUGkV
SrrtlO/7TyDP5gRchQIeHWt/phIcuxeTwGOdC9RwZ213xgVSdLUUuCNsx6UaTCpSyFWLGfXjhLZ
d35IPRb0//pWbdvhFQNkbqR4bMr32MwLKJWSQZj6yxBg/YyGqC5hcLKcnTm+Bv59CXOyLBCoKWa
iEew5J3FvogO9mkFZZ0+ui7zjyA1HJUFaPdolOKv9fe3XNnnaPGU3co4GPjlDQklZrz6Ku3j/XN
zu2OimN3zFWelLwYMxJrJf7RqBJcTXYknowX9G/I+MH9qXt+Aduc1PIexAuy1QNzEx6SbqXipkD
TPb94XGHxpHaeGO2sTXRn/CqaOyLpPJVN3kgcU5pcz7d4mzle+dEjnFSYej5dI6vuKwcuQ2MxNj
1zPIFeW7ApejeZBm1Hsvv93hQJWHWlzeGQNk8BX1ZVkG5sKtF6ZMcsf9b3g9l/1GBcB7TOCFZzU
ejKWOf0eSjI+7WsNNrGDpCM/SVQ3wLPeH9Z+UQemeqr7fKH3WZkJmb9Vpy3/e2smm4UiBKvULHX
g7LnA=
X-Received: by 2002:a5d:5f52:0:b0:48c:4658:602b with SMTP id ffacd0b85a97d-48e5d2e7375mr1542295f8f.10.1793134803805;
Tue, 27 Oct 2026 14:00:03 -0700 (PDT)
X-Received: from localhost ([2001:818:c665:a700:d08f:88e:8091:3e4])
by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3ebc3932sm26156864f8f.18.2026.10.27.14.00.01
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Tue, 27 Oct 2026 14:00:03 -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: <xmqqpkwvj7bj.fsf@gitster.g>