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

Re: [GSoC] Doubts in an issue

From
abhishek kumar <abhishekkumar8222@gmail.com>
Date
Jan 28, 2020, 10:02 UTC
Message-ID
<CAHk66fs+FX_W+MwOCOF1_zw_vPz73D+0HbTrb7sXTHzgnWhzQQ@mail.gmail.com>
Greetings Shourya

I am not exactly Johannes (just another GSoC applicant) but here's what I understood from the issue and your thread:

> And what exactly do we mean by "built-ins" here(does it refer to the "dashed" commands)?

"Built-in" refers to commands implemented in C [1][2]. The more common use of "built-in" which is a command that the shell (bash, sh, ksh) carries out itself [3]. The name draws out the similarity between shell builtins and git builtins, both written in C and executable through the shell.

Therefore, "hardlink built-in to the corresponding dashed forms" is to create a hard link with the dashed form name to the C program.

> where is the <<libexec/git-core/>> directory?

As the makefile suggests, the programs and scripts are installed at `gitexecdir`. I couldn't find it but instead found `GIT_EXEC_PATH` which point to pretty much the same thing. You can find it by `git --exec_path` [4].

> Now, whenever we call scripts whose "dashed" version exists, it will sort of link the "dashed" version as well for I guess historical reasons? ;)

No. Creating hard links is done during the build process. But calling `git-<script-name>` through `git <script-name>` makes `git` prepend `libexec/gitcore` which is necessary to find the hard link. So, you are half-right :).

Regards Abhishek

[1]: https://github.com/msysgit/msysgit/wiki/Why-Is--libexec--so-huge%3F [2]: https://github.com/git/git/blob/master/builtin.h [3]: https://unix.stackexchange.com/a/11465 [4]: https://git-scm.com/book/en/v2/Git-Internals-Environment-Variables

Next: Johannes Schindelin
Message 1 of 2 in “Re: [GSoC] Doubts in an issue”
  1. abhishek kumarJan 28, 2020
  2. Johannes SchindelinJan 30, 2020

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.