From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-b8-smtp.messagingengine.com (fout-b8-smtp.messagingengine.com [202.12.124.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EDE89309F1C for ; Thu, 2 Jul 2026 05:21:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.151 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782969692; cv=none; b=nP6MJT2/ScDnyDVRFnhb7/o/rnJSsAFw7rNJnxXqtE3qbVszvnTmbcym663/g780AOAf9yVAmDb34X0d04pQ8YMkrvVRBIPwIXvm02CPvW7rW68GKqyjXZX5mst/ubEN753DfyyYOP28JByy3dOIzKLeNo+6LJz2yCwz/HrM5ts= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782969692; c=relaxed/simple; bh=JWJduhoojarGgHoQcy4J4w+gm/pcH0hSYuDAsY49L1w=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=OswiL9MBxRvwUwYDgkJPPTVfHbOtTF3Vw1C3GJVf3BHm5J4ZfVhX/XgRd53yS9rl5zlVMHmnc3PtQzXEtG4CzgcU/K7PESbNLgLDjGwmHX5l9wGwsFdyHRbSdksUAwdwyVt8UOdJdHVTTwh1bbTMaRGV+2MtUOlFuJkFASHw7To= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=q/ipLx9J; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=IOqfL6RD; arc=none smtp.client-ip=202.12.124.151 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="q/ipLx9J"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="IOqfL6RD" Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfout.stl.internal (Postfix) with ESMTP id 20FA51D00058; Thu, 2 Jul 2026 01:21:29 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Thu, 02 Jul 2026 01:21:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :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=fm1; t=1782969688; x=1783056088; bh=5Ne1r1QXGc 0Hy8McIhm/sOCa7HXWi+anldjI+XDQ0+4=; b=q/ipLx9Jq2vcO7+lCvoDtEhXp5 CeL1JjMk0/SV+XuA2qeNSgXMakGEbhGp7m2zRQI81zGm8lvHI6Hb9Gk8QZrFfjwQ xlg1A5WaFXnixhvJJecZGOIszYkxOm1O2y7hGAQXS6vfIoRiG48JiKG7BsfEkQgT fNEjbukcZOwcRjbpTVzG2Vbw/OJNGujyntdpimSvmg4E15k/SvZf//M+5a5mHC7s 3HOS7mX9KfQR7hZaVstDCGtUX9ZBzJ73V+TXbKN/0aCYvqsoTrsbEZ381E5zjtSc C/Z2lsOEaX2haxHGH+lHm5OmTS6JQCT6yzW1MUx8avNbr/GXgJSwLuNZNnvg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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=fm1; t= 1782969688; x=1783056088; bh=5Ne1r1QXGc0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r9mhL+8L8sFLcp8InXL1bahIbUjvStQ X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 2 Jul 2026 01:21:26 -0400 (EDT) Received: by mail (OpenSMTPD) with ESMTPSA id 9f27f812 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 2 Jul 2026 05:21:23 +0000 (UTC) Date: Thu, 2 Jul 2026 07:21:16 +0200 From: Patrick Steinhardt To: Junio C Hamano Cc: Phillip Wood , SZEDER =?utf-8?B?R8OhYm9y?= , git@vger.kernel.org, "brian m. carlson" , Elijah Newren , Derrick Stolee , Phillip Wood Subject: Re: [PATCH RFC v2 2/2] Move libgit.a sources into separate "lib/" directory Message-ID: References: <20260622-pks-libgit-in-subdir-v2-0-cb946c51ee7b@pks.im> <20260622-pks-libgit-in-subdir-v2-2-cb946c51ee7b@pks.im> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, Jul 01, 2026 at 07:45:09AM -0700, Junio C Hamano wrote: > Phillip Wood writes: > > > As I said last time this came up, I don't really buy the discoverability > > argument because there are just as many files to trawl through to find > > what you're looking through and now there is an extra directory to > > check. I think the solution to that is to recommend folks use "git grep" > > or ctags etc. not moving code to a new directory. > > Hear, hear. Also it would be great if we can trick some talented > technical writer into writing the "map" of the source so that by > reading this one or two pager, any new person with reasonable > competence will know how things are partitioned into pieces and how > these pieces fit together. I wonder how good LLMs are these days? > ;-) This isn't about discoverability of the library files though, I specifically want to improve discoverability of all the other files that we have in our root directory. So yes, I fully agree that this change does not help to make that one file that is part of our library easier to find. > > I do however think putting all the library code in a subdirectory makes > > it easier to say things like "please try to avoid new uses of > > 'the_repository' and prefer 'error()' over 'die()' in library code" > > because all the library code is in the same directory. I think that is a > > much stronger selling point. > > Yes. "library code (things outside the subdirectories) should not > use X" would work just fine, though. That rule doesn't quite work: - We have several C files that are not library files and that are in the top-level directory. For example "scalar.c" or "shell.c". - We have several C files that are part of the library and that are in a subdirectory. For example "compat/", "refs/", "odb/". So having this properly cleaned up would help to have clear indicators what component a given file belongs to. > > Another cost is remembering things have moved - the other day I spent > > too long wondering why "git show origin/seen:wt-status.c" wasn't working > > until I ran "git log origin/seen" and realized it had move to > > lib/wt-status.c. > > Yes, this has bit me multiple dozen times, as the tip of 'seen' is > contaminated with this rename, already. It is a huge pain. Yeah, this one I don't have any arguments against besides a very hand-wavy "it'll get better over time" :) Thanks! Patrick