From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=103.168.172.148 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795905492; b=QqMweltFwuptKP+D+Dg3Gr1R3ZR77ukTuNZwHHzPAz5VDK1DkuTnEsaCS3nKg2OdOBgw vZbpYe3KL7A+I1rTpSOJX4Q5jRdLWA646Y+tPoHdk4LCdux1uCleKafqFyqhNpsogP5qd 75ywJKQsRq0YVhajo2ovZBSPDhnGYW2yznWUl4oM+HRfDBgALxDRUZiTrpLjQSumMfABI 1XK7ju8r6z7ejdDz/WIxKe8J5zrysUCsaJ2A74jEMgu85uG/wnusSoDzVuH82ucHRdJXz Mo/2pPRdP/H42sVj7M7W6fZHXBRC5FHiiPgjXErFZWK6aBoIdngoDfYbDVWntBhk+Nw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795905492; h=DMARC-Filter:Received:Received:DKIM-Signature:DKIM-Signature: X-DKIM2-Info:DKIM2-Signature:X-DKIM2-Info:Message-Instance: X-ME-Sender:X-ME-Received:X-ME-Proxy-Cause:X-ME-Proxy:Feedback-ID: Received:From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: User-Agent:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=ykF7uneJ7bcrLJfW/IiTJliu4rbao6Y9y7OOKM5VfIo=; b=dF6WkEPgaWwQfSe2hQ5T1F3kNG/pM+DpwnOE6iqekxg6xcjvrryj43YJtTbIVC6fX9+H R/cA3ZhslvKtoRGKb81A7sIcOWX5n0DnnbzXSyUpaHvDLtSdhYlh13e4OcTa9LYoKXe4P 15cjk9AbuRvdttk/Mbejg+jUxygKUV3CzbI1qXfndf1d4KsxIwHmDWAdgwbOESPHD5kjv zmCbr2FVQeggmcBfd4jp9NZHkRFH8tLNvKM+0QQxOlUyQp9kCikDLulL8iqQIOYsB9D4L nIt5A09m05+lIwhcVzVmdEx5gSrqiWdF/ntWp/kGpYxz0mPoVmnA2KDFxFRRP2El6dg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=pobox.com; spf=pass smtp.mailfrom=pobox.com; dkim=pass header.d=pobox.com header.i=@pobox.com header.a=rsa-sha256 header.s=fm2 header.b=TlN+yw52; dkim=pass header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=oDMfdH+A; arc=none smtp.remote-ip=103.168.172.148 Received: from fout-a5-smtp.messagingengine.com (fout-a5-smtp.messagingengine.com [103.168.172.148]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D6AAA606A31C for ; Sat, 28 Nov 2026 22:38:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D6AAA606A31C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pobox.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=pobox.com header.i=@pobox.com header.a=rsa-sha256 header.s=fm2 header.b=TlN+yw52; dkim=pass (2048-bit key, unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=oDMfdH+A Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfout.phl.internal (Postfix) with ESMTP id 0B033EC0A08 for ; Sat, 28 Nov 2026 17:38:11 -0500 (EST) Received: from phl-frontend-01 ([10.202.2.160]) by phl-compute-01.internal (MEProxy); Sat, 28 Nov 2026 17:38:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pobox.com; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1795905491; x=1795991891; bh=ykF7uneJ7bcrLJfW/IiTJliu4rbao6Y9y7OOKM5VfIo=; b= TlN+yw52/kOFJx0pkNGg6PWaRMo+cDMCcxwmHNc4vZYcM2CG0mZ1xYtmjXQJrYCg nCUYcSv6pm3XOyB+ieaTAyr6atZ9JGbWC6TINIPlr+Vl2FBTeizN+U2SswiFoNwc 0Fyx0juUAqt5TW/5H4NhzU7ndcpEBBwwVfnfxyAjWf/xHmwfVOoomX7Ged+W81F3 bGZgz8GDUOQYwYOY2wjMGxWPkUKEqHhHIabfhix5p2cJ1L4zUHB81Whd9ZpjnHkf VW8uGBGyUgKJVGtTr+jw0kibLQifAfHemo2wUv51gqhfFtCHjt7x+gs3P4+jXwa+ u/oz7FgCJJQjNcfzduJuiA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1795905491; x= 1795991891; bh=ykF7uneJ7bcrLJfW/IiTJliu4rbao6Y9y7OOKM5VfIo=; b=o DMfdH+A7l6Ke/72iLQIyhqOa5swtM6yjnZMh53QYkFmhw3jsZZHQFkOQyaTPPUj4 VKnuOcPh/B6JMk8ZP0IocNRcsM7rLWTl8jelE9KuVuS2KSdFdpnV6mplnkXyMsvg BbTCVPH4OB4ekxDdE+YAPjoVUqU5Csj+vppX52/SSSkpkTjsMffGU1n9+ZQqaOX+ 4DDxqAg9pXW6X1q+rTQKISFEMYnS52+qylld9ofuhBFOphUL+YcQ8dNilr61VuDN GmVijNthdJGzAkH8551whBv7tL7povp22OaPtIwmOAJ1R+XmgUxzXlydUl5XENMC HrTO69HtMEAC4M/D/CtNw== X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-09; repo=github.com/dkim2wg/interop; date=2026-11-03; sw=lmtpprox; action=sign d=pobox.com a=rsa-sha256; DKIM2-Signature: i=1; m=1; t=1795905491; d=pobox.com; mf=PGdpdHN0ZXJAcG9ib3guY29tPg==; rt=PGdpdEB2Z2VyLmtlcm5lbC5vcmc+; s=fm2:rsa-sha256:DpV8NcRddoqb5lPCNeuupsk2O/GjySg3bbjHEuaM+JDAeSm AWRVfOZkC2H9Ii+QQZcJL5Hsk2icgTn3U/hYQmbK7GXQH4kC+EQUXkmYwJLSMPfc tGeCDrHNxgGbqXQ3XxEUEmncfJRt5ha2kSl24NUV5Nvz1GCr8IG9xubdzSBk4nrY BQGAOOW43d/3iry2PJmdJwrrL0GmXE4LlLNPwSGsxMKrFzDaQgUDlqNyTGB/epk7 tKkzCEeTwwew0UQXKGCjpC2VepLCHBAMIBZvqO6rzeXPEKIz528RcJi8eWJeAsb9 UTNLMOpENjyCHWIXTgqQf+NpRtm+cjWFrgCSO/A==; X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-09; repo=github.com/dkim2wg/interop; date=2026-11-03; sw=lmtpprox; action=mi-m=1; hc=13; hn=cc,content-transfer-encoding,content-type,date,feedback-id, from,in-reply-to,message-id,mime-version,references,subject,to, user-agent; Message-Instance: m=1; h=sha256:nwNpmB9L5C1MiDHUuKfZeibiFatym9hDsBw/4/IFicU=:Ef+Uas4PWwv598aywVkRhtgpUsabb9Y6xErHpRc7Yfc=; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTFaMT9J0W/C5ABZp93tpG49IzsyQRG1EaOs6HoyXgzZNDeu/ieFf5c2zHDeNq69HN MePt7RmvQhzAnCcZO5A7FuD3nAlmbljMZK65PKCboVt0aHm/F0KsVcl55SXeNasH5bEeK/ 6gd7AcVMdMUWGeDn93aqL3xIFY6lvvk8vman6jk1CEPzBF17Vh6EhQFNP9fCw0YK0QsFHb hf/Fgq0i4bp4WBMpi/zsJNUsKJOb5bbsm67LWyW6TkgTWD+fgPhenutvft5QrijJjRz9eI uT5WRaTneHPs9d6qcateOVD3zbvz6UpLVorn8lECBH1xYvTrxgtPqn0JMf28EAI/FKuFML c+hQ5o7rBaMvFWa/F8JVqxcimaFkqhr+qBKwWC/4HqoYNUIg+IHdXj2pbE5RZrSCcgBEhg AI/vVvpeenlMSXGYtILGK/fgEj/XK7LHK2IYgoqHy6c07ra6S4riZuTTduw6IoJa9GfKsI fPqDkdbZrRhvHu02uuZ+PA8AS0UNepLgQsXwpUYlTkDXx3XVmX0XEgV5PyKfxVDufUxiaO 5yXJivb+8yeD3Gnxzjd+A6zltlA4lm5RRisVkUO2jm0tsgtaffBjC8w28gHtfzSqWdmwO6 5iQpupbnryIQlhhekozC+QZzxgZqH1LY+GND7UN5H1w31inXe0jPNg6uWrjg X-ME-Proxy: Feedback-ID: if26b431b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 28 Nov 2026 17:38:10 -0500 (EST) From: Junio C Hamano To: =?utf-8?Q?Ren=C3=A9?= Scharfe Cc: Git List Subject: Re: [PATCH] archive: pass export-subst attribute value as parameter In-Reply-To: <6c09fc91-b461-451d-90d6-512a4f785d8a@web.de> (=?utf-8?Q?=22R?= =?utf-8?Q?en=C3=A9?= Scharfe"'s message of "Sat, 28 Nov 2026 19:47:49 +0100") References: <6c09fc91-b461-451d-90d6-512a4f785d8a@web.de> Date: Sat, 28 Nov 2026 14:38:09 -0800 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) X-Mailing-List: git@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit René Scharfe writes: > The member "convert" of struct archiver_args is used to pass the value > of blob attribute export-subst to object_file_to_archive(). That's an > unusual place and a misleading name. Add and use an appropriately named > parameter to that function instead. > > Signed-off-by: René Scharfe > --- > archive.c | 12 +++++++----- > archive.h | 1 - > 2 files changed, 7 insertions(+), 6 deletions(-) The name is misleading indeed. Why it is "an unusual place" needs a bit of explanation to convince others, I am afraid, so let me try to spell out the reason why, as I understand it, and see if that matches yours (and if so, "an unusual place" above may want to be strengthened by the reason why). There are two ways this function and write_entry() (and possibly others) receive settings from their caller, write_archive_entry(). The archiver_args structure is meant to hold the settings common across different entries to be written. In addition, per-call parameters give information specific to each entry being written by a particular call, like the path of the entry and its file mode. The 'export_subst' setting is per path and specified via attributes, so it definitely is not common across entries. It does not belong there, and making it a parameter passed to object_file_to_archive() moves it to the right place. And with a more correct name, which is very nice ;-) Now, are there members other than '.convert' in the archiver_args that should be moved out of there for the same reason? The '.convert' member needs to be reset in write_archive_entry() for each and every path because of this misplacement. If there is no longer any member that is not common across entries, perhaps many of the consumers of 'struct archiver_args *' can take a const pointer, most notably the write_archive_entry() function? It needs to propagate the constness down to write_entry(), and is better left outside this patch, perhaps. The patch of looks good to me. Thanks.