{"thread":{"id":"54126","subject":"[RFD] on removing \"git-foo\" for builtins from disk","startedAt":"2020-08-24T22:23:44Z","lastAt":"2020-08-24T22:23:44Z","messageCount":1,"participants":["Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"404384","messageId":"xmqqbliz3cpg.fsf@gitster.c.googlers.com","threadId":"54126","inReplyTo":null,"subject":"[RFD] on removing \"git-foo\" for builtins from disk","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-08-24T22:23:39Z","receivedAt":"2020-08-24T22:23:44Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Back in 2005, all \"git\" subcommands were installed in $PATH as\n\"git-commit\" etc., and people wrote their scripts assuming that they\nare all available on their $PATH.  But it then became cumbersome to\nhave so many \"git-foo\" commands in /usr/bin/.  Because \"git\" is\ninstalled in /usr/bin/ and knows to dispatch to 'git-foo' subcommand\nwhen invoked with 'foo' as its first argument, we asked our users to\nuse \"git foo\" form and moved \"git-foo\" commands out of /usr/bin/,\nmoved to /usr/libexec/git-core/, and gave an escape hatch, which is\nto add the output of \"git --exec-path\" early in their $PATH, to old\nscripts (i.e. the scripts needed a one-line fix).\n\nExectly 12 years ago, we asked the users if they still need these\non-disk binaries [*1*].  Many built-in commands (i.e. subcommands\nwhose code is in the \"git\" binary), as long as they are invoked in\n\"git foo\" form, do not need to be installed anywhere on-disk, and\ntheoretically can be removed, as long as the users and the scripts\nthey wrote long time ago, following our advise to use the escape\nhatch, can somehow be convinced.\n\nRemoving /usr/libexec/git-core/git-{add,branch,commit,...} will\nallow us to reduce disk footprint on systems that do not support\nhardlinks and slightly simplifies the installation procedure.  Some\nfolks want to do so unconditionally.  The only downside being that\nwe finally break the promise we made our users 12 years ago.\n\nI do not have a strong opinion either way, but if proponents for\nremoval can convince others successfully, I do not mind removing the\nunnecessary on-disk binaries for built-in commands.\n\nDiscuss away.\n\n\n[References and Footnotes]\n\n*1* https://lore.kernel.org/git/7vprnzt7d5.fsf@gitster.siamese.dyndns.org/\n"}]}