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

Re: [PATCH 1/3] connect: Rename name to command in connect_git()

From
Wesley <wesleys@opperschaap.net>
Date
Mar 28, 2026, 02:01 UTC
Message-ID
<01ca1166-c3ad-48a9-8edf-be82d380e110@opperschaap.net>
In-Reply-To
<20260328014426.GA621762@coredump.intra.peff.net>
On 3/27/26 21:44, Jeff King wrote:
Show 27 quoted lines
> On Fri, Mar 27, 2026 at 08:58:22PM -0400, Wesley wrote:
> 
>>> So probably "op" or "type" is a more accurate description. This
>>> conceptually ought to be an enum, too, since it is selecting from a
>>> limited set of operations we know about.
>>
>> That's a fair take on it, "name" is really a not the best name for this
>> variable. I think "op" covers what you describe here best, it reflects also
>> why I named it command. When you check what is sent via ssh, it looks like
>> the command:
>>
>>     ssh -o SendEnv=GIT_PROTOCOL git@gitlab.com git-upload-pack
>> 'waterkip/git.git'
> 
> Right, but it's necessarily what is sent via ssh. E.g.:
> 
>    $ GIT_TRACE=1 git ls-remote example.com:repo.git
>    [...]
>    trace: start_command: /usr/bin/ssh -o SendEnv=GIT_PROTOCOL example.com 'git-upload-pack '\''repo.git'\'''
> 
>    $ GIT_TRACE=1 git ls-remote --upload-pack=foobar example.com:repo.git
>    [...]
>    trace: start_command: /usr/bin/ssh -o SendEnv=GIT_PROTOCOL example.com 'foobar '\''repo.git'\'''
> 
> That's why I think "command" is actively misleading, because between
> "prog" and "command" it is not clear which one is going to be sent to
> the remote.

Ha! Interesting. I see the confusion :) I'm not really sure what to call it.

I see the manpage calls it 'exec':
   --upload-pack=<exec>
      Specify the full path of git-upload-pack on the remote host. This
      allows listing references from repositories accessed via SSH and
      where the SSH daemon does not use the PATH configured by the user.

and it's the full path of the git-upload-pack command if the remote doesn't use the PATH. So it is command, just.. I'm not sure what to call it. It executable, binary, program, operation, script. I feel they all cover the same concept. remote-command? It could be any of them iyam.

Cheers, Wesley

-- 
Wesley

Why not both?
Previous: Jeff KingNext: Wesley Schwengle
Message 6 of 24 in “Add support for per-remote and per-namespace SSH options”
  1. 0/3 Add support for per-remote and per-namespace SSH optionsWesley Schwengle, Mar 26, 2026
  2. 1/3 connect: Rename name to command in connect_git()Wesley Schwengle, Mar 26, 2026
  3. Jeff KingMar 27, 2026
  4. WesleyMar 28, 2026
  5. Jeff KingMar 28, 2026
  6. WesleyMar 28, 2026
  7. 2/3 connect: Add transport->remote->name to git_connect()Wesley Schwengle, Mar 26, 2026
  8. Jeff KingMar 27, 2026
  9. 3/3 connect: Add support for per-remote and per-namespace SSH optionsWesley Schwengle, Mar 26, 2026
  10. Jeff KingMar 27, 2026
  11. WesleyMar 28, 2026
  12. Jeff KingMar 28, 2026
  13. WesleyMar 28, 2026
  14. Johannes SixtMar 27, 2026
  15. WesleyMar 27, 2026
  16. Junio C HamanoMar 27, 2026
  17. WesleyMar 27, 2026
  18. brian m. carlsonMar 27, 2026
  19. WesleyMar 28, 2026
  20. Johannes SixtMar 28, 2026
  21. WesleyMar 28, 2026
  22. Ben KnobleMar 29, 2026
  23. brian m. carlsonMar 27, 2026
  24. Junio C HamanoMar 27, 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.