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

[RFD] on removing "git-foo" for builtins from disk

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 24, 2020, 22:23 UTC
Message-ID
<xmqqbliz3cpg.fsf@gitster.c.googlers.com>

Back in 2005, all "git" subcommands were installed in $PATH as "git-commit" etc., and people wrote their scripts assuming that they are all available on their $PATH. But it then became cumbersome to have so many "git-foo" commands in /usr/bin/. Because "git" is installed in /usr/bin/ and knows to dispatch to 'git-foo' subcommand when invoked with 'foo' as its first argument, we asked our users to use "git foo" form and moved "git-foo" commands out of /usr/bin/, moved to /usr/libexec/git-core/, and gave an escape hatch, which is to add the output of "git --exec-path" early in their $PATH, to old scripts (i.e. the scripts needed a one-line fix).

Exectly 12 years ago, we asked the users if they still need these on-disk binaries [*1*]. Many built-in commands (i.e. subcommands whose code is in the "git" binary), as long as they are invoked in "git foo" form, do not need to be installed anywhere on-disk, and theoretically can be removed, as long as the users and the scripts they wrote long time ago, following our advise to use the escape hatch, can somehow be convinced.

Removing /usr/libexec/git-core/git-{add,branch,commit,...} will allow us to reduce disk footprint on systems that do not support hardlinks and slightly simplifies the installation procedure. Some folks want to do so unconditionally. The only downside being that we finally break the promise we made our users 12 years ago.

I do not have a strong opinion either way, but if proponents for removal can convince others successfully, I do not mind removing the unnecessary on-disk binaries for built-in commands.

Discuss away.
[References and Footnotes]
*1* https://lore.kernel.org/git/7vprnzt7d5.fsf@gitster.siamese.dyndns.org/
Message 1 of 1 in “[RFD] on removing "git-foo" for builtins from disk”
  1. Junio C HamanoAug 24, 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.