by jackowayed · 15y ago · 0 comments
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.
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.
Totals grouped by language (dominant language first):
ansic: 122029 (46.81%)
sh: 88481 (33.94%)
perl: 23931 (9.18%)
tcl: 20351 (7.81%)
python: 4021 (1.54%)
lisp: 1785 (0.68%)
asm: 98 (0.04%)
Please credit this data as "generated using David A. Wheeler's 'SLOCCount'."lisp is there as an emacs mode.
tcl is gitk and git-gui.
asm is under compat, so it's portability stuff for (likely braindead) platforms.
$ sloccount *.* block-sha1 builtin
Totals grouped by language (dominant language first):
ansic: 100854 (83.83%)
perl: 12704 (10.56%)
sh: 6608 (5.49%)
python: 143 (0.12%)Isn't this a problem that is easily solved ? I mean Github is a pretty large company built on top of git. I know that Github is sponsoring work on libgit2, but JGit is pretty good as well (and so is the pure python implementation - Dulwich).
Would it cost too much for Github to sponsor a bounty to make a pure python/ruby/java based implementation and keep it in sync with Junio's git ?
Though it is not the intention, I'm pretty sure if you had a 100% Github-supported Dulwich git... it would be very hard for mercurial to stand up as an alternative. Which is why it is hard for me to understand why isn't such an obvious business lead being taken advantage of. I genuinely want to understand whether it is a very hard technical problem - which will make me respect Linus even more.
As in ESR's "TAoUP".
Now, you may dislike this paradigm, but it's hardly "bunch of obscene hacks with no sense of style".
[edit] Having said that, thanks for saving the infrastructure for you projects, that was cool move of you.
[1]: http://www.kernel.org/pub/software/scm/git/
edit: Looks like there are a few importers written in python as well, but those are entirely optional.