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

Re: Does GIT_SSH_COMMAND apply to all git commands that connect to remote?

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 26, 2024, 15:33 UTC
Message-ID
<xmqqy15oxj5p.fsf@gitster.g>
In-Reply-To
<3856e339-3c93-4c29-a668-334bdd7bff7a@3mdeb.com>
Michał Iwanicki <michal.iwanicki@3mdeb.com> writes:
> I'm asking this question, because in docs it explicitly mentions git fetch and git push. Does it apply do other commands
> like git clone? If yes then maybe this information should be added?

"git clone" is like "init + fetch + reset --hard" and "git pull" is like "fetch + merge/rebase". They both talk to a remote repository.

When the partial clone feature that allows lazy fetching of missing objects is in use, you cannot even name an exact command that may trigger transferring of objects from remote repositories, as a fetch happens on-demand any time you access an object that you ought to have fetched during the initial clone but you didn't due to use of the partial clone feature.

All of them use the usual remote transfer mechanism.

I doubt that it makes sense to repeat it in any and all commands that potentially connect to remote repositories. In fact, "git help git", the most central place, is where GIT_SSH_COMMAND and GIT_SSH environment variables are described.

Previous: Michał Iwanicki
Message 2 of 2 in “Does GIT_SSH_COMMAND apply to all git commands that connect to remote?”
  1. Michał IwanickiJul 26, 2024
  2. Junio C HamanoJul 26, 2024

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.