From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-a8-smtp.messagingengine.com (fhigh-a8-smtp.messagingengine.com [103.168.172.159]) (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 EB27A28DB54 for ; Wed, 1 Jul 2026 06:55:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.159 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782888927; cv=none; b=ONAG89Efb4lKOCTY6oPWCUAbk8oLG07pEeRDjC93TYNvs8LW2QW8yVc2NKk0t79s0OO9Gibl/H/ZH2XRSCwV84fpnnw26SZAr4NolUtKuqquWSQUtYpZHb5TNk6nG2IEQ77jpE9N0abg61Is/zAAJw2nbscfH/s8em589CHo1nY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782888927; c=relaxed/simple; bh=2yMBCSWMNWvEA+VvTIhZkKJsQZwLIGS3c0mfbIU/ZZA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=qX4mF9yiWZCZSAJyA46Z/U9IIbA4hnG+irCC+kemZQDJ6fe/jAkSuD0w0sBAvnrfLtkmp/5RaICSLE39DH3v3xro41DuTHRQKvKuSdoBILm/lcfcXECMqN0OOSnfP1lpWDZoBelX9OHmJFuwJf2C5+iRD0m8MHK9qL1cTtXIrVU= 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=kc82DZ0/; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=VTajcE9i; arc=none smtp.client-ip=103.168.172.159 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="kc82DZ0/"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="VTajcE9i" Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id 2EF4F1400168; Wed, 1 Jul 2026 02:55:25 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-04.internal (MEProxy); Wed, 01 Jul 2026 02:55:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; 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=fm1; t=1782888925; x=1782975325; bh=fjRN4ttoErj/i4ldD4/RBPSM3E0aIlCPnRiK5ELLbws=; b= kc82DZ0/Iu+lnyWkZtjg1uUfj+eqcc19+GpKIStJydBChiXIJW7D3jv5nRa8iyS6 A10eSeCQKwOs1mwgs6OJhbHWAIxlcNH4ryMzRGE0SdkHeU0+ZvUSAp5h7Z2Wcpr+ RmUZVoFdufNV2tor3uVhY8I9eSFITU2wuALuFGAwqTDviGrj1bUYg7S3t1F6aJg8 MQBvL+yO4tNGxJASUqN62Xv+GlF3/OK7Hsn61yF3MKZ9rYCkux2wrJx698pTKbL5 V7U5wQpXJcNeJ9RR2GoiEqafpQgIRYlHXcm9KlFQ7ZWMhzOIEjW/RNZ4LHpLKbgr YlXEmwzlnlAE3mnyF7vueg== 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=fm1; t=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LSJoL1LutGlLZHvY2WkUpDJikJDIcnpQwfNztrhGQK9uNl9JtVf3sA X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 1 Jul 2026 02:55:23 -0400 (EDT) Received: by mail (OpenSMTPD) with ESMTPSA id a5dde90e (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 1 Jul 2026 06:55:22 +0000 (UTC) Date: Wed, 1 Jul 2026 08:55:19 +0200 From: Patrick Steinhardt To: SZEDER =?utf-8?B?R8OhYm9y?= Cc: git@vger.kernel.org, "brian m. carlson" , Junio C Hamano , 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Sat, Jun 27, 2026 at 08:40:48AM +0200, SZEDER Gábor wrote: > On Mon, Jun 22, 2026 at 12:38:22PM +0200, Patrick Steinhardt wrote: > > The Git project is not exactly the easiest project to get started in: > > it's written in C and POSIX shell, with bits of Perl, Rust and other > > languages sprinkled into it. On top of that, the project has grown > > somewhat organically over time, making the codebase hard to navigate. > > > > These are problems that we're aware of, and there have been and still > > are efforts to clean up some of the technical debt that is natural to > > exist an a project that is more than 20 years old. Furthermore, we > > provide resources to newcomers that help them out like our coding > > guidelines, code of conduct or "MyFirstContribution.adoc". > > > > But there is a rather practical problem: finding your way around in our > > project's tree is not easy. Doing a directory listing in the top-level > > directory will present you with more than 550 files, which makes it > > extremely hard for a newcomer to figure out what files they are even > > supposed to look at. This makes the onboarding experience somewhat > > harder than it really needs to be. This isn't only a problem for > > newcomers though, as I myself struggle to find the files I am looking > > for because of the sheer number of files. > > > > Besides the problem of discoverability it also creates a problem of > > structure. It is not obvious at all which files are part of "libgit.a" > > and which files are only linked into our final executables. So while we > > have this split in our build systems, that split is not evident at all > > in our tree. > > > > Introduce a new "lib/" directory and move all of our sources for > > "libgit.a" into it to fix these issues. It makes the split we have > > evident and reduces the number of files in our top-level tree from 550 > > files to ~80 files. > > > > This is still a lot of files, but it's significantly easier to navigate > > already. Furthermore, we can further iterate after this step and think > > about introducing a better structure for remaining files, as well. > > Please also discuss the drawbacks of this proposal, and try to argue > convincingly that the benefits outweigh the drawbacks. This is overall a subjective change, so there is no "right" or "wrong". The reason why I think the pain is ultimately worth it is that it's a one-time cost for a permanent improvement in discoverability. And that improvement is especially helpful for newcomers, who already have a hard time navigating the code base. > I, for one, see myself being rather annoyed by regular 'git log > lib/foo.c' stopping at the rename barrier, and by the limitations of > '--follow'. Right. As mentioned in a parallel subthread, I think this is a deficiency in Git itself which we are in the best position to fix. If it is proving to be painful, then it might even help to subject ourselves to the same pain that other projects that do larger renames experience. So it might motivate us to improve this area. In any case, I'll amend these thoughts to the commit message, thanks! Patrick