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

From: Jeff King <[email-masked]>
Date: Fri, 27 Mar 2026 21:44:26 -0400

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 [email-masked] 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.

-Peff