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
Junio C Hamano <gitster@pobox.com>
Date
Aug 7, 2017, 16:35 UTC
Message-ID
<xmqqshh3qqs4.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20170805064905.5948-1-mforney@mforney.org>
Michael Forney <mforney@mforney.org> writes:
Show 8 quoted lines
> 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.

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*].

The changes in your patch still are good changes to make sure people who copy & paste code would see fewer instances of "git-foo", but "will still work even if I break my installation of Git by removing them from the filesystem" is not the project's goal.

IIUC, you will need "$GIT_EXEC_PATH/git-checkout" on the filesystem if you want your "git co" alias to work, as we spawn built-in as a dashed external.

[Reference]
*1* https://public-inbox.org/git/alpine.LFD.1.10.0808261114070.3363@nehalem.linux-foundation.org/
Previous: Johannes SchindelinNext: Junio C Hamano
Message 9 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.