Re: [PATCH] C implementation of the 'git' program.
From: Linus Torvalds <torvalds@osdl.org>
Date: 2016-06-15 22:42:11
On Thu, 10 Nov 2005, Andreas Ericsson wrote:
This patch provides a C implementation of the 'git' program and introduces support for putting the git-* commands in their own directory. It also saves some time on executing git-* commands in a tight loop and it prints the currently available git commands in a nicely formatted list.
I think this makes sense - "git" may be a very simple program even in shell, but hey, it's simple even in C, and while performance may be a secondary issue, when it is in C we will have the option to extend in more effectively later. For example, we might implement some things directly in the "git" wrapper. And the performance difference does seem to be quite noticeable too..
The location of the GIT_LIB can be obtained by running git --lib
I think this might be a bit ambiguous. When I see "GIT_LIB", to me it implies traditional libraries (ie a "libgit.a" kind of thing), not the kind of "git executable plugin" directory. So I'd suggest renaming "--lib" and "GIT_LIB" to be more of a "--libexec" kind of flavor, if only to avoid that confusion. Even if the actual directory ends up being /usr/lib/git-<version>/ as in my original suggestion, I think it's good to make it clear that it's not just some kind of "link type" library, but more of a combination of libraries and plugins and executables. But maybe that's just me? Linus