Move libgit.a sources into separat "lib/" directory #2271
Conversation
|
There is an issue in commit a1057aa:
|
|
There is an issue in commit eadf54f:
|
|
There is an issue in commit 6c0c3ab:
|
81d8e54 to
a3364aa
Compare
|
There is an issue in commit a1057aa:
|
1 similar comment
|
There is an issue in commit a1057aa:
|
a3364aa to
2533db0
Compare
|
There is an issue in commit a1057aa:
|
2533db0 to
aaf4dd6
Compare
|
There is an issue in commit a1057aa:
|
Hi,
this small patch series follows up on a discussion we had two years ago
during the Git Contributor's Summit in Berlin.
I'm fully aware that this will likely result in some discussion, which
is why I have labelled this as RFC. I'd be fine with a result of "let's
not do it" if we cannot agree on this step, but I think that the current
layout hurts discoverability quite a bit. Not only for newcomers, but
I'm also struggling with it quite frequently.
I also intentionally decided to send this close to the upcoming release
so that the series can be merged early in the next release cycle if we
were to agree on it.
I've tested this patch series with both GitLab [1] and GitHub [2].
Changes in v2:
- Feedback was generally positive, and we're close to -rc0 again. So
I've decided to rebase the patch series and send v2 out before the
quiet pre-release phase kicks off. The series is thus built on top
of 9ac3f19 (The 11th batch, 2026-06-02) now.
- Fix a couple of instances I missed to update in Meson.
- Link to v1: https://patch.msgid.link/20260416-pks-libgit-in-subdir-v1-0-03afc731df55@pks.im
Thanks!
Patrick
[1]: https://gitlab.com/gitlab-org/git/-/merge_requests/544
[2]: git#2271
To: git@vger.kernel.org
Cc: "brian m. carlson" <sandals@crustytoothpaste.net>
Cc: Junio C Hamano <gitster@pobox.com>
Cc: Phillip Wood <phillip.wood123@gmail.com>
Cc: Elijah Newren <newren@gmail.com>
Cc: Derrick Stolee <stolee@gmail.com>
--- b4-submit-tracking ---
# This section is used internally by b4 prep for tracking purposes.
{
"series": {
"revision": 2,
"change-id": "20260415-pks-libgit-in-subdir-d8eec849cd48",
"prefixes": [
"RFC"
],
"presubject": "",
"history": {
"v1": [
"20260416-pks-libgit-in-subdir-v1-0-03afc731df55@pks.im"
]
}
}
}
In the next commit we're about to introduce a new "lib/" directory and move all of our files into it. With this split the compiler won't be able to find one of the includes in "test-example-tap.c" anymore. Adjust it to a relative include to prepare for this change. Signed-off-by: Patrick Steinhardt <ps@pks.im>
aaf4dd6 to
8e0a1d5
Compare
|
There is an issue in commit 736b782:
|
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. Signed-off-by: Patrick Steinhardt <ps@pks.im>
8e0a1d5 to
ea44a10
Compare
|
There is an issue in commit 736b782:
|
This PR verifies that CI is succeeding with those changes.