git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH RFC v3 2/2] Move libgit.a sources into separate "lib/" directory

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 17, 2026, 20:58 UTC
Message-ID
<xmqq7blo4g7g.fsf@gitster.g>
In-Reply-To
<CAC2QwmKs-TV2f=2BhBNQGtVA4vzciN-Vkh95RkGcVKe=6zwwRQ@mail.gmail.com>
Michael Montalbo <mmontalbo@gmail.com> writes:
Show 10 quoted lines
> Pointing forward, merging today's root .c files by that measure until
> cohesion drops below the carved band proposes these groups, with no
> hand-picked list [1]:
>
>   6.9  connect.c fetch-pack.c remote-curl.c send-pack.c transport.c
>        upload-pack.c
>   6.8  diff-lib.c entry.c read-cache.c unpack-trees.c
>   6.6  commit.c log-tree.c ref-filter.c revision.c sequencer.c
>   6.3  diff.c diffcore-rename.c merge-ort.c
>   6.0  delta-islands.c pack-bitmap-write.c pack-bitmap.c

We need to be careful about situations where a source file has to include a header file only because a definition of one thing it uses happens to be included in an otherwise out-of-place header file, and moving such an out-of-place definition to a different header file may affect mechanical groupings. But with that caveat out of the way, it is good when mechanical groupings match intuition.

And the earliest one in the list above actually does. They form the "transport" group.

The other groups in the list may not be so clear-cut, but this is an interesting thought experiment that yielded a good, concrete result. And as I said, we do not need to wait until we fully classify the remainder. When a conceptually clean group is identified, just as when we created 'builtin/', 'refs/', or 'odb/', we can carve out a new directory for it, and we will have moved one step closer to a better place.

One tangential question is whether we can separate bisect and revision machinery in such a way that bisect stands on its own, without stronger ties to the revision machinery than other users, such as 'rev-list' and 'log'. "git rev-list --bisect" was a historical accident that happened only because, back when "git bisect" was a shell script, there was no good place to put the logic, not because it was the best place for it.

Thanks.
Previous: Michael MontalboNext: brian m. carlson
Message 14 of 18 in “Move libgit.a sources into separate "lib/" directory”
  1. 0/2 Move libgit.a sources into separate "lib/" directoryPatrick Steinhardt, Jul 1, 2026
  2. 1/2 t/helper: prepare "test-example-tap.c" for introduction of "lib/"Patrick Steinhardt, Jul 1, 2026
  3. 2/2 Move libgit.a sources into separate "lib/" directoryPatrick Steinhardt, Jul 1, 2026
  4. SZEDER GáborJul 13, 2026
  5. Johannes SchindelinJul 20, 2026
  6. Junio C HamanoJul 20, 2026
  7. Patrick SteinhardtAug 11, 2026
  8. Junio C HamanoAug 11, 2026
  9. Patrick SteinhardtAug 11, 2026
  10. Johannes SchindelinAug 13, 2026
  11. Junio C HamanoAug 13, 2026
  12. Michael MontalboAug 13, 2026
  13. Michael MontalboAug 14, 2026
  14. Junio C HamanoAug 17, 2026
  15. brian m. carlsonJul 20, 2026
  16. Junio C HamanoJul 20, 2026
  17. Taylor BlauJul 20, 2026
  18. Patrick SteinhardtAug 11, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.