* Does GIT_SSH_COMMAND apply to all git commands that connect to remote?
@ 2024-07-26 8:25 Michał Iwanicki
2024-07-26 15:33 ` Junio C Hamano
0 siblings, 1 reply; 2+ messages in thread
From: Michał Iwanicki @ 2024-07-26 8:25 UTC (permalink / raw)
To: git
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?
https://git-scm.com/docs/git/2.45.1#Documentation/git.txt-codeGITSSHCOMMANDcode
> If either of these environment variables is set then git fetch and git push will use the specified command instead of
> ssh when they need to connect to a remote system
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Does GIT_SSH_COMMAND apply to all git commands that connect to remote?
2024-07-26 8:25 Does GIT_SSH_COMMAND apply to all git commands that connect to remote? Michał Iwanicki
@ 2024-07-26 15:33 ` Junio C Hamano
0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2024-07-26 15:33 UTC (permalink / raw)
To: Michał Iwanicki; +Cc: git
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-07-26 15:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-26 8:25 Does GIT_SSH_COMMAND apply to all git commands that connect to remote? Michał Iwanicki
2024-07-26 15:33 ` Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).