🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.git
Article #869

Re: [PATCH] init: show absolute path of (re)initialized repository

#869
From: "Matt Hunter"
Date: Tue, 20 Oct 2026 09:13
52 lines
9408 bytes
On Tue Oct 20, 2026 at 2:55 AM EDT, Patrick Steinhardt wrote:
> On Tue, Oct 20, 2026 at 01:38:47AM -0400, Matt Hunter wrote:
>> 
>> None of the discussion [1] around the original patch indicates that this
>> change was intentional, so address the regression by similarly using
>> repo_get_git_dir in this code's new location.
>
> This indeed wasn't an intentional change. I also confirmed that with
> v2.55 we print the full path.

And with 2.56 :-)  Output changed right at the beginning of this release
cycle.

>
>> In this case, git_dir is referencing owned memory that is later freed,
>> so declare a new variable to hold the used string.
>
> This sentence doesn't add any value as it simply explains parts that are
> obvious when reading the patch. I'd just drop it.

Yeah.. Will do

>
>> +		int len = strlen(full_git_dir);
>
> I was wondering whether we want to fix the variable type to be a
> `size_t` while at it. But maybe we should just keep it as-is.

It's not of consequence to this change, but I agree it would be more
correct.  I'll include it.

>
> I'm a bit on the fence about whether we want to have a regression test
> or not. It feels like a very specific thing in the user-facing output,
> so it's a bit dubious whether it's really worth it.

This is my thought exactly.

> But on the other
> hand, folks like you seem to care enough to make the test worthwhile, so
> maybe we should have one?

I could be convinced to add one.  I'll see if additional feedback comes
in before sending a new revision, but won't plan for a test as of now.

Thanks for the review

>
> Thanks!
>
> Patrick
Technical Details
Message-ID: <DM9JTHREBQOW.3IOHX6OZK3BGQ@lfurio.us>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-72503-linux-kernel-git=dewy.ru
References: <20261020053932.1274210-1-m@lfurio.us> <atcQb_V69vvKnxoF@pks.im>

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-72503-linux-kernel-git=dewy.ru
From: m@lfurio.us ("Matt Hunter")
Newsgroups: linux.kernel.git
Subject: Re: [PATCH] init: show absolute path of (re)initialized repository
Date: Tue, 20 Oct 2026 05:13:07 -0400
Organization: Usenet Network
Message-ID: <DM9JTHREBQOW.3IOHX6OZK3BGQ@lfurio.us>
References: <20261020053932.1274210-1-m@lfurio.us> <atcQb_V69vvKnxoF@pks.im>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
	logging-data="3819464"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:VCHEIEh9nDOgkytWwFhlK1pDql4= sha256:o7YuSIE1/RKACcfxd7nHwfqm1pjWJ/Dcj1s4jzjqoRE=
	sha1:9zHjgMzwbxSQVEcCfWFReEqcaGc= sha256:26T5KDp1Z9HLFDmg/l7f+xH83oTO4a5IhnGwZLP+RLQ=
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 BA493110C57; Tue, 20 Oct 2026 12:19:17 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -1.95
X-Spam-Status: No, score=-1.95 tagged_above=-9999 required=6.31
	tests=[DCC_CHECK=1.1, DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
	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 (1024-bit key)
	header.d=lfurio.us
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 Yrnjd4kfpubc;
	Tue, 20 Oct 2026 12:19:11 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=git+bounces-72503-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=lfurio.us
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id ABE9D110C50; Tue, 20 Oct 2026 12:19:02 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id 51BA63F397; Tue, 20 Oct 2026 09:13:25 +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=1792487603;
	b=Vm94SKuxkD/+31dINTusqgukRm2dweEuKeMZcQt+Z/rJ8TIH8j8SBUYYt7eKTgXG0hLM
	 17f4xYUE1SUSWX+EHhVf4z6YlDZ2kkwhAi9/FS0L5pnf19Sm7CDcs4AYYi39JO3rrKXrm
	 9Ww+ybJYjwIraa+2LHrzRHK7bQr3FVbv91oMcO0Z6TGQAU7TpEU+r37AUfxNMsYt5zFiY
	 AOtABgkWe959GIIUiaxGPmiRd7O+bTDifi3ZQ3Sz1Kz8mmafyhGJ+L+4s8uC8UEZhQJnv
	 4Gqgyz1HWLTv0uVJrmL8PuAtxZp7D9zlSxHBkniivBWE3nWWwRvl+KiAlMvknhPgNwQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792487603;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature: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:To:From:
	 Subject:Cc:X-Mailer:References:In-Reply-To;
	bh=HtkdE+ttN4l02Cff81RNj/qjPctHWr14LjOJ9Ie+MuY=;
	b=Hx6T6GYmgvNDMvT7NosvAxAHUSLCY/j5lWz668Y23q4nEGP4KMeljlFabQqDba6G24St
	 c3Cmz9NhoOZHcXp9t7YBS/iiH8DilqVdP3w8btMbp0th6+PIOpxphS6Ez8Q+Rm34WEvy5
	 8j2ZK4erSVrFdig8S3fdLcVWC6Wiq4VugpfmhqRs01W3yALFlKodpDTOrzu+7ldAyB09x
	 gsTGgwMVzu7A/3BoNqrNd+JAa9Sx3qnYOxMk/A25E7dMdk3ESWSBbSOQkM+nqUsA5lZN1
	 /fTFQNQ4U+1f5QVeavdu9WB0S7qu58sQQ/rTxVmJEQNorLlhfyuO3bnNF+ljWacud9A==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=lfurio.us header.i=@lfurio.us header.a=rsa-sha256 header.s=default header.b=btiOOjrg;
	dmarc=pass header.from=lfurio.us;
	spf=pass smtp.mailfrom=lfurio.us;
	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 02147606A327;
	Tue, 20 Oct 2026 09:13:23 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key, unprotected) header.d=lfurio.us header.i=@lfurio.us header.a=rsa-sha256 header.s=default header.b=btiOOjrg
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=157.230.60.252
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1792487601;
	b=mCbUvASKWcaAv1Lr9N7hmxWChacRmMmNUpowAo7CnXw72R9upUPwaYMm2rLELInymb4r
	 /WFX2sOyL7h2LVBAJ6czidrqzEim8AqpUjTSidWh3+HiyLy05xx1iRpoxj+YA+y5FwM7B
	 lC3MsQTB38RwU3mRIy2kg7w3/ZVJm8RqI64vQYZKdcU4xlGgG0dQziW92CHNIQaPaG+Jy
	 olsr6Uj9PmawDuHRGlDPq82ZMErRF8I6S0gHuOHCXxahR8SQ/BEK7PCuvK/GmUBl5wPCs
	 SAksr2dUvBqjJAs7kfDyZ4CuqAP5LAuxdkO7vHGNGIPVUEKOxFLbg8cRT7KLn9WbjBA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792487601;
	h=DMARC-Filter:DKIM-Signature:Received:Mime-Version:
	 Content-Transfer-Encoding:Content-Type:Date:Message-Id:To:From:
	 Subject:Cc:X-Mailer:References:In-Reply-To;
	bh=HtkdE+ttN4l02Cff81RNj/qjPctHWr14LjOJ9Ie+MuY=;
	b=e3k0Dzy60tPIdXNFIRnGxKSufO6ZluUd1Pu+4OACgMBumKgCbGb5rfF3TY0ukGOxtVQm
	 wqPw0e6/jMuyk3AprsKPVjYM1DhS6CDU1Ofany+Ta7tmwuP4culz5sb5slpTEXlreKfYY
	 o1aszCM1Cdgurr6fi7apyk0NwQywyzTNOvw4ktwUMCEqvHxD4DlCRDkcMKxYW4e7ljQJ2
	 m2Pg1zd48SiaecuBq4k6J7kq/plXuHmacv//XZUVyLtvmIjM0zpDq2WrQr8zNh6X3tPKy
	 LA9VKBI2YGyX31pXlblXi3HIKo+1akAbPqeXEba/piZ2oRIM4PZSPTiMxFz6+37fYnw==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=lfurio.us;
	spf=pass smtp.mailfrom=lfurio.us;
	dkim=pass header.d=lfurio.us header.i=@lfurio.us header.a=rsa-sha256 header.s=default header.b=btiOOjrg;
	arc=none smtp.remote-ip=157.230.60.252
X-Received: from mail.normalmode.org (h01.normalmode.org [157.230.60.252])
	(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 CA02A606A31A
	for <git@vger.kernel.org>; Tue, 20 Oct 2026 09:13:20 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org CA02A606A31A
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lfurio.us
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lfurio.us
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lfurio.us; s=default;
	t=1792487599; bh=rbJ9BmebXykbOlJduXHl/ltvrvl6lUwc4Y2W5/Jp62E=;
	h=Date:To:From:Subject:Cc:References:In-Reply-To:From;
	b=btiOOjrg1ZdzKtrtKnDFDdxApx/Nuhr7d12MPeIBxs60mPf8jah2bJC9jLznvZN3i
	 bIyhaTG2ANXMEH0EkJNUaDopVvIWbyQja00JbbEpLB8sJnyqMhGt31s5TXg5UX98Fr
	 zuJt+7I40cFO6vN7649Jl0IrZ96u+5nceKVxpfG8=
X-Received: by mail.normalmode.org (Postfix) with ESMTPSA id 92DAB619CD;
	Tue, 20 Oct 2026 09:13:19 +0000 (UTC)
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-0-g5549850facc2
X-In-Reply-To: <atcQb_V69vvKnxoF@pks.im>