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

Re: [PATCH] Drop some dashes from built-in invocations in scripts

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Aug 7, 2017, 19:22 UTC
Message-ID
<alpine.DEB.2.21.1.1708072113570.4271@virtualbox>
In-Reply-To
<xmqqshh3qqs4.fsf@gitster.mtv.corp.google.com>
Hi Junio,
On Mon, 7 Aug 2017, Junio C Hamano wrote:
Show 14 quoted lines
> Michael Forney <mforney@mforney.org> writes:
> 
> > This way, they still work even if the built-in symlinks aren't
> > installed.
> >
> > Signed-off-by: Michael Forney <mforney@mforney.org>
> > ---
> > It looks like there was an effort to do this a number of years ago (through
> > `make remove-dashes`). These are just a few I noticed were still left in the
> > .sh scripts.
> 
> Our goal was *not* to have *no* "git-foo" on the filesystem,
> though. It happened in v1.6.0 timeframe and it was about removing
> "git-foo" from end-user's $PATH.

That was in the v1.6.0 timeframe. It is past time to reconsider the goal, though, as there is really very little use in keeping the dashed forms.

And it does hurt in some circumstances. Take for example .zip files: they do not support hard-links. So if you need to distribute Git binaries in .zip files, you are not only affected negatively by the less-than-stellar compression ratio compared to .bz2 let alone LZMA, Git adds insult to injury by *forcing* an additional inflation by pointlessly adding the builtins *again*.

> Earlier there was a more ambitious proposal to remove all "git-foo"
> even from $GIT_EXEC_PATH for built-in commands, but that plan was
> scuttled [*1*].

That *1* is not a good reference, I am afraid. It says very little in addition to paraphrased commands to stop responding (when a more civilized call back to rational arguments might have been a lot more productive).

In that light, would you kindly explain in your own words what is your current thinking on shipping dashed forms of builtins?

I mean, I can understand for git-upload-pack, to help with determining permissions on server sides (it is easier to filter out all `git` commands than to painstakingly look whether argv[1] equals `upload-pack`). It's sort of a very unfortunate outlier.

But I cannot understand at all why we insist on installing hardlinked copies (or not so hardlinked copies when hardlinks are unavailable) for builtins, when these copies really outlived their usefulness a long, long time ago.

So I would love to hear the arguments for keeping the dashed forms of builtins, even if the only surviving argument may be "I dig in my feet because I always said we'd keep them".

Ciao, Dscho

Previous: Junio C HamanoNext: Junio C Hamano
Message 13 of 16 in “Drop some dashes from built-in invocations in scripts”
  1. Drop some dashes from built-in invocations in scriptsMichael Forney, Aug 5, 2017
  2. Johannes SchindelinAug 5, 2017
  3. Junio C HamanoAug 5, 2017
  4. Michael ForneyAug 5, 2017
  5. Junio C HamanoAug 5, 2017
  6. Michael ForneyAug 6, 2017
  7. Junio C HamanoAug 7, 2017
  8. Johannes SchindelinAug 5, 2017
  9. Junio C HamanoAug 7, 2017
  10. Junio C HamanoAug 7, 2017
  11. Michael ForneyAug 7, 2017
  12. Junio C HamanoAug 7, 2017
  13. Johannes SchindelinAug 7, 2017
  14. Junio C HamanoAug 7, 2017
  15. Johannes SchindelinAug 7, 2017
  16. Junio C HamanoAug 7, 2017

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.