Skip to content

Move libgit.a sources into separat "lib/" directory #2271

Open
pks-gitlab wants to merge 3 commits intogit:masterfrom
pks-gitlab:b4/pks-libgit-in-subdir
Open

Move libgit.a sources into separat "lib/" directory #2271
pks-gitlab wants to merge 3 commits intogit:masterfrom
pks-gitlab:b4/pks-libgit-in-subdir

Conversation

@pks-gitlab
Copy link
Copy Markdown

This PR verifies that CI is succeeding with those changes.

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.

Thanks!

Patrick

To: git@vger.kernel.org

--- b4-submit-tracking ---
# This section is used internally by b4 prep for tracking purposes.
{
  "series": {
    "revision": 1,
    "change-id": "20260415-pks-libgit-in-subdir-d8eec849cd48",
    "prefixes": [
      "RFC"
    ],
    "presubject": ""
  }
}
@gitgitgadget-git
Copy link
Copy Markdown

There is an issue in commit a1057aa:
Move libgit.a sources into separate "lib/" directory

  • Commit not signed off

@gitgitgadget-git
Copy link
Copy Markdown

There is an issue in commit eadf54f:
t/helper: prepare "test-example-tap.c" for introduction of "lib/"

  • Commit not signed off

@gitgitgadget-git
Copy link
Copy Markdown

There is an issue in commit 6c0c3ab:
Move libgit.a sources into separat "lib/" directory

  • Commit not signed off

@pks-gitlab pks-gitlab force-pushed the b4/pks-libgit-in-subdir branch from 6c0c3ab to 81d8e54 Compare April 15, 2026 13:11
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>
@pks-gitlab pks-gitlab force-pushed the b4/pks-libgit-in-subdir branch from 81d8e54 to a3364aa Compare April 15, 2026 13:11
@gitgitgadget-git
Copy link
Copy Markdown

There is an issue in commit a1057aa:
Move libgit.a sources into separate "lib/" directory

  • Commit not signed off

1 similar comment
@gitgitgadget-git
Copy link
Copy Markdown

There is an issue in commit a1057aa:
Move libgit.a sources into separate "lib/" directory

  • Commit not signed off

@pks-gitlab pks-gitlab force-pushed the b4/pks-libgit-in-subdir branch from a3364aa to 2533db0 Compare April 15, 2026 13:15
@gitgitgadget-git
Copy link
Copy Markdown

There is an issue in commit a1057aa:
Move libgit.a sources into separate "lib/" directory

  • Commit not signed off

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>
@pks-gitlab pks-gitlab force-pushed the b4/pks-libgit-in-subdir branch from 2533db0 to aaf4dd6 Compare April 15, 2026 13:19
@gitgitgadget-git
Copy link
Copy Markdown

There is an issue in commit a1057aa:
Move libgit.a sources into separate "lib/" directory

  • Commit not signed off

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants