From: Jeff King <peff@peff.net>
To: Thomas Quinot <thomas@quinot.org>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH v4] git_connect: set ssh shell command in GIT_SSH_COMMAND
Date: Mon, 10 Nov 2014 02:11:55 -0500 [thread overview]
Message-ID: <20141110071154.GD7677@peff.net> (raw)
In-Reply-To: <20141109224231.GA59064@melamine.cuivre.fr.eu.org>
On Sun, Nov 09, 2014 at 11:42:32PM +0100, Thomas Quinot wrote:
> It may be impractical to install a wrapper script for GIT_SSH
> when additional parameters need to be passed. Provide an alternative
> way of specifying a shell command to be run, including command line
> arguments, by means of the GIT_SSH_COMMAND environment variable,
> which behaves like GIT_SSH but is passed to the shell.
>
> The special circuitry to modify parameters in the case of using
> PuTTY's plink/tortoiseplink is activated only when using GIT_SSH;
> in the case of using GIT_SSH_COMMAND, it is deliberately left up to
> the user to make any required parameters adaptation before calling
> the underlying ssh implementation.
>
> Signed-off-by: Thomas Quinot <thomas@quinot.org>
> ---
>
> Amended patch as per discussion with Junio: change variable name
> to GIT_SSH_COMMAND, keep plink special circuitry disabled for
> this case (leaving it enabled only when using GIT_SSH, thus
> preserving compatibility with legacy usage).
I think this version looks good. Thanks for working on it.
Two style micro-nits (that I do not think even merit a re-roll by
themselves, but Junio may want to mark up as he applies):
> + } else {
> + ssh = getenv("GIT_SSH");
> + if (!ssh) ssh = "ssh";
You did not even introduce this line, but only reindented it. However,
our code style usually would write this as:
if (!ssh)
ssh = "ssh";
> + putty = strcasestr(ssh, "plink") != NULL;
We would usually write this as:
putty = !!strcasestr(ssh, "plink");
-Peff
next prev parent reply other threads:[~2014-11-10 7:12 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-08 10:44 [PATCH] git_connect: allow passing arguments to ssh in GIT_SSH_ARGS Thomas Quinot
2014-11-08 11:09 ` Jeff King
2014-11-08 12:35 ` Thomas Quinot
2014-11-08 14:27 ` [PATCH v2 1/2] git_connect: set ssh shell command in GIT_SSH_CMD Thomas Quinot
2014-11-09 9:51 ` Jeff King
2014-11-09 12:39 ` Thomas Quinot
2014-11-09 13:24 ` [PATCH v3] " Thomas Quinot
2014-11-09 17:32 ` [PATCH v2 1/2] " Junio C Hamano
2014-11-09 17:47 ` Thomas Quinot
2014-11-09 17:58 ` Junio C Hamano
2014-11-09 22:42 ` [PATCH v4] git_connect: set ssh shell command in GIT_SSH_COMMAND Thomas Quinot
2014-11-10 7:11 ` Jeff King [this message]
2014-11-10 8:28 ` Thomas Quinot
2014-11-10 16:54 ` Junio C Hamano
2014-11-08 14:29 ` [PATCH v2 2/2] git_connect: when using GIT_SSH_CMD, check for plink in argv[0] only Thomas Quinot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141110071154.GD7677@peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=thomas@quinot.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.