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

Re: About GIT Internals

From
KKKonstantin Khomoutov <kostix@bswap.ru>
Date
Jun 3, 2022, 15:23 UTC
Message-ID
<20220603152301.olqbjtt5j2kqyc3e@carbon>
In-Reply-To
<CACMKQb3_j+iFcf5trZEcWoU7vAsscKv+_sLaEqg_qfazBPTo+Q@mail.gmail.com>
On Fri, Jun 03, 2022 at 05:48:14PM +0530, Aman wrote:
[...]
Show 9 quoted lines
> Though I may understand the internal design and high-level
> implementation of GIT, I really want to know how it's implemented and
> was made, which means reading the SOURCE CODE.
> 
> 1. I don't know how absurd of a quest this is, please enlighten me.
> 2. How do I do it? Where do I start? It's such a BIG repository - and
> I am not guessing it's going to be easy.
> 3. Would someone advise, perhaps, to have a look at an older version
> of the source code? rather than the latest one, for some reason.

Well, depends on what you mean when talking about the two mentioned designs. I mean, there's the design of the approach to manage data and there's the design of the software package (which Git is).

If you do also understand the latter - that is, understanding that Git is an assortment of CLI tools combined into two layers called "plumbing" and "porcelain", - then you should have no difficulty starting to read the code: basically locate the source code of the entry point Git binary (which is, well, "git", or "git.exe" on Windows) and start reading it. You'll find it parses its command-line arguments and calls out to other executable modules which are parts of the Git software package to do heavy lifting. You then read the source code of the packages of interest, and so on and so on. I'm not sure there could be any other "guide" to read the source code.

If you're not familiar with the design of Git-as-a-software-package, it's probably time to clone the Git repository and explore the contents of the directory named "Documentation" there.

Previous: Junio C HamanoNext: Aman
Message 14 of 17 in “About GIT Internals”
  1. AmanMay 25, 2022
  2. Emily ShafferMay 25, 2022
  3. Erik Cervin EdinMay 25, 2022
  4. git-vger@eldondev.comMay 25, 2022
  5. Philip OakleyMay 26, 2022
  6. Konstantin KhomoutovMay 26, 2022
  7. Philip OakleyMay 27, 2022
  8. Kerry, RichardMay 30, 2022
  9. Konstantin KhomoutovMay 30, 2022
  10. Ævar Arnfjörð BjarmasonMay 30, 2022
  11. AmanJun 3, 2022
  12. Emily ShafferJun 3, 2022
  13. Junio C HamanoJun 3, 2022
  14. Konstantin KhomoutovJun 3, 2022
  15. AmanJun 4, 2022
  16. Konstantin KhomoutovJun 6, 2022
  17. Philip OakleyMay 27, 2022

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.