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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 1, 2026, 14:45 UTC
Message-ID
<xmqq1pdmrcp6.fsf@gitster.g>
In-Reply-To
<cbbb08fc-fd4d-45ef-927b-05ac44602ff1@gmail.com>
Phillip Wood <phillip.wood123@gmail.com> writes:
Show 5 quoted lines
> 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? ;-)

Show 5 quoted lines
> 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.

> 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.

Previous: Phillip WoodNext: Patrick Steinhardt
Message 27 of 32 in “Move libgit.a sources into separate "lib/" directory”
  1. 0/2 Move libgit.a sources into separate "lib/" directoryPatrick Steinhardt, Apr 16, 2026
  2. 1/2 t/helper: prepare "test-example-tap.c" for introduction of "lib/"Patrick Steinhardt, Apr 16, 2026
  3. 2/2 Move libgit.a sources into separate "lib/" directoryPatrick Steinhardt, Apr 16, 2026
  4. Elijah NewrenApr 17, 2026
  5. brian m. carlsonApr 17, 2026
  6. Junio C HamanoApr 17, 2026
  7. brian m. carlsonApr 17, 2026
  8. Patrick SteinhardtApr 20, 2026
  9. Phillip WoodApr 19, 2026
  10. Patrick SteinhardtApr 20, 2026
  11. Derrick StoleeApr 20, 2026
  12. Patrick SteinhardtApr 21, 2026
  13. Derrick StoleeApr 21, 2026
  14. Patrick SteinhardtApr 22, 2026
  15. 0/2 Move libgit.a sources into separate "lib/" directoryPatrick Steinhardt, Jun 22, 2026
  16. 1/2 t/helper: prepare "test-example-tap.c" for introduction of "lib/"Patrick Steinhardt, Jun 22, 2026
  17. 2/2 Move libgit.a sources into separate "lib/" directoryPatrick Steinhardt, Jun 22, 2026
  18. Junio C HamanoJun 22, 2026
  19. Patrick SteinhardtJun 24, 2026
  20. Oswald BuddenhagenJun 24, 2026
  21. Johannes SchindelinJun 26, 2026
  22. Junio C HamanoJun 26, 2026
  23. Patrick SteinhardtJul 1, 2026
  24. SZEDER GáborJun 27, 2026
  25. Patrick SteinhardtJul 1, 2026
  26. Phillip WoodJul 1, 2026
  27. Junio C HamanoJul 1, 2026
  28. Patrick SteinhardtJul 2, 2026
  29. Kaartic SivaraamJul 6, 2026
  30. 0/2 Move libgit.a sources into separate "lib/" directoryPatrick Steinhardt, Jul 13, 2026
  31. 1/2 t/helper: prepare "test-example-tap.c" for introduction of "lib/"Patrick Steinhardt, Jul 13, 2026
  32. 2/2 Move libgit.a sources into separate "lib/" directoryPatrick Steinhardt, Jul 13, 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.