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

Re: [PATCH] doc: add information regarding external commands

From
Omri Sarig <omri.sarig13@gmail.com>
Date
Mar 3, 2026, 17:07 UTC
Message-ID
<CAP9es6vwDccuY_NC+q=ua7u-cwORV4-eLhPf3dPDrBf+JkAT0Q@mail.gmail.com>
In-Reply-To
<xmqqqzq1x2lp.fsf@gitster.g>
Thank you for the reply and review - a fixed patch V2 is incoming shortly.
On Mon, Mar 2, 2026 at 11:56 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 36 quoted lines
>
> "Omri Sarig via GitGitGadget" <gitgitgadget@gmail.com> writes:
>
> > From: Omri Sarig <omri.sarig13@gmail.com>
> >
> > Git supports running external commands in the user's PATH as if they
> > were built-in commands (see execv_dashed_external in git.c).
>
> Correct.
>
> > This feature was not documented in any of Git's user-facing
> > documentation.
>
> "Not documented in any" is a slight exaggeration.  See "git help
> git" and look at description of "--list-cmds" option; "all commands
> in $PATH that have git- prefix" is mentioned there.  Also "git help
> help" talks about "--no-external-commands" that excludes "git-*"
> commands found on $PATH from the listing, which implies these things
> count as available commands.
>
> Nevertheless, it is a good idea to make it more discoverable.
>
> > This commit adds a short documentation of this feature, making it easier
> > for users to discover and use.
>
> I would have expected that under Environment Variables > System,
> next to HOME, we would add an entry for PATH that says something
> like:
>
>     When a user runs 'git <command>' that is not part of the core
>     Git programs (installed in GIT_EXEC_PATH), 'git-<command>' that
>     is runnable by the user in a directory on `$PATH` is invoked.
>
>
> or something like that; I didn't expect us to add a dedicated
> separate section for it.

I've added this now as you suggest. I made it slightly more verbose (adding information about the arguments for the commands, and about it taking precedence over aliases). If you want it to be shorter again, let me know and I'll remove this information.

>
> Thanks.
>

With Kind Regards, Omri

Previous: Junio C HamanoNext: Omri Sarig via GitGitGadget
Message 3 of 10 in “doc: add information regarding external commands”
  1. doc: add information regarding external commandsOmri Sarig via GitGitGadget, Mar 2, 2026
  2. Junio C HamanoMar 2, 2026
  3. Omri SarigMar 3, 2026
  4. doc: add information regarding external commandsOmri Sarig via GitGitGadget, Mar 3, 2026
  5. doc: add information regarding external commandsOmri Sarig via GitGitGadget, Mar 3, 2026
  6. Junio C HamanoMar 3, 2026
  7. D. Ben KnobleMar 3, 2026
  8. Omri SarigMar 3, 2026
  9. Junio C HamanoMar 3, 2026
  10. doc: add information regarding external commandsOmri Sarig via GitGitGadget, Mar 4, 2026

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.