-
Notifications
You must be signed in to change notification settings - Fork 142
Add a build option to skip linking all those built-ins to their dashed form #406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hey dscho, EDIT: I tried to comment out |
To be more precise: in addition to calling That is, if your Git executable lives in BTW "built-in" means that the command is implemented directly inside the Now, build Git's source code via Since those "dashed" forms are both unnecessary as well as deprecated, it would be a pretty okay thing to optionally skip that hard-linking stage altogether. Having said all this, have you noticed that I already opened a "Work-in-Progress" Pull Request, as noted above? |
I appreciate your reply, I have understood it for the most part. |
See #411 (comment)
It's not really a list, it is a variable that concatenates two lists... But yes, I think that this is the correct direction to go. Unless you find a better way, that is. |
Once upon a time, in a galaxy far, far away, a Git version still was developed under the impression that it should consist of little Unix tools that are cobbled together by Unix shell scripts. In those olden days, all of those tools lived in the
PATH
, using names that all started withgit-
and it was a great hodge podge that Unix graybeards were prone to love: almost a hundred executables cluttering the tab completion (at which Unix graybeards sneer regularly), spawned processes galore.Fast forward into a more modern time, Git has almost no Unix script parts left, and many, many built-in commands. Those are commands that are contained in the
git
executable, can be called asgit <command>
instead of the "dashed" formgit-command
, and avoid at least one extra spawned process that way.For
hystericalhistorical reasons, even if there is pretty much no need whatsoever anymore to have, say,git-add
in thelibexec/git-core/
directory, we do still hardlink all of those built-ins to the corresponding "dashed form", just so that any old script that still expects, say,git-read-tree
to be in itsPATH
(when calling scripts whose name are of the formgit-<script-name>
viagit <script-name>
, thegit
executable will take pains to prepend thelibexec/git-core/
directory to thePATH
), when in reality it should callgit read-tree
instead, i.e. the "undashed" form.It does take quite a while to link all those built-ins during a build, especially on Windows, where the
make
process uses a POSIX emulation layer (i.e. the MSYS2 runtime, a slightly modified Cygwin runtime), which takes quite some time.The Git maintainer indicated that they would be fine with a build-time option to not link those built-ins. Eventually, this option should probably become the default.
The text was updated successfully, but these errors were encountered: