diff options
author | Jeff King <peff@peff.net> | 2015-09-08 04:33:14 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-09-08 15:33:21 -0700 |
commit | a48b409f9ccd4e1957286ba064fd3a25a9ea2b56 (patch) | |
tree | 0b39d2fdb8b39d8e0f3c185aa52ecd14e9671353 /Documentation/RelNotes | |
parent | git_connect: clear GIT_* environment for ssh (diff) | |
download | tgif-a48b409f9ccd4e1957286ba064fd3a25a9ea2b56.tar.xz |
git_connect: clarify conn->use_shell flag
When executing user-specified programs, we generally always
want to use a shell, for flexibility and consistency. One
big exception is executing $GIT_SSH, which for historical
reasons must not use a shell.
Once upon a time the logic in git_connect looked like:
if (protocol == PROTO_SSH) {
... setup ssh ...
} else {
... setup local connection ...
conn->use_shell = 1;
}
But over time the PROTO_SSH block has grown, and the "local"
block has shrunk so that it contains only conn->use_shell;
it's easy to miss at the end of the large block. Moreover,
PROTO_SSH now also sometimes sets use_shell, when the new
GIT_SSH_COMMAND is used.
Let's just set conn->use_shell when we're setting up the "conn"
struct, and unset it (with a comment) in the historical GIT_SSH
case. This will make the flow easier to follow.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/RelNotes')
0 files changed, 0 insertions, 0 deletions