3 ms·
Git's core is C. This has the packfile and object store code, the diffing and patching code, reflog code, generic commit-walking libraries, etc. I read it a few
by jakevoytko 15y ago
Git's core is C. This has the packfile and object store code, the diffing and patching code, reflog code, generic commit-walking libraries, etc. I read it a few years ago when making a Git packfile reader, and the C code is very understandable. I grokked it much quicker than HG's core, the only other one I read.
Most of Git's functionality is built with scripts. Lots of jobs, like octopus merging, are done in Bash scripts that dispatch all of the real work to the C libraries. The Git source distribution has a contrib section that has Python, elisp, and Perl (among others). It also includes a few subprojects like Gitweb, each done in random languages. All of this causes the overall source tree feel very unorganized.
- js2 15y agoAs of 1.7.5.2, git-core is 119 binaries, 29 shell scripts, 9 perl scripts, and 1 python script. The intention is to eventually replace the remaining shell scripts with C. Perl is used for add-interactive, most of the import/export functionality (arch, cvs, svn), gitweb, and the send-email script. Python is a relatively recent addition, and is being used for the so-called remote helpers, which will eventually allow git to push/pull changes from non-git servers. TCL is used for gitk only.