Git development
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: Fredrik Tolf <fredrik@dolda2000.com>,
	Keith Packard <keithp@keithp.com>,
	git@vger.kernel.org,
	"Edward Z. Yang" <edwardzyang@thewritingpot.com>,
	Steffen Prohaska <prohaska@zib.de>
Subject: Re: [PATCH] Ensure that SSH runs in non-interactive mode
Date: Mon, 21 Jul 2008 00:17:47 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.1.00.0807210012480.3305@eeepc-johanness> (raw)
In-Reply-To: <7vhcak5o6n.fsf@gitster.siamese.dyndns.org>

Hi,

On Sun, 20 Jul 2008, Junio C Hamano wrote:

> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
> > How about this instead?
> >
> > -- snipsnap --
> > diff --git a/connect.c b/connect.c
> > index 574f42f..7e7f4d3 100644
> > --- a/connect.c
> > +++ b/connect.c
> > @@ -603,7 +603,8 @@ struct child_process *git_connect(int fd[2], const char *url
> >  
> >  		*arg++ = ssh;
> >  		if (port) {
> > -			*arg++ = "-p";
> > +			const char *opt = getenv("GIT_SSH_PORT_OPTION");
> > +			*arg++ = opt ? opt : "-p";
> >  			*arg++ = port;
> >  		}
> >  		*arg++ = host;
> 
> If you only care only about the ones we currently want to support, I do
> not htink it makes any difference either way, but if we are shooting for
> having a minimum-but-reasonable framework to make it easy to support other
> ones that we haven't seen, it feels very much like an inadequate hack to
> waste an envirnoment variable for such a narrow special case.  With this,
> what you really mean is "Plink uses -P instead of -p", right?

Yeah.  My first attempt was to allow "GIT_SSH='plink.exe -P %p %h'" to 
work, and for that matter, "git config --global transport.ssh 'plink.exe 
-P %p %h'", but I decided that it would be easier to do the patch I 
posted.

Anyway, I think that this issue wasted enough of my time, as I will never 
use plink anyway.  As long as the patch does not have an adverse effect on 
my use case, which happens to be the default case, I will just not bother 
anymore, even if I think that GIT_SSH=wrapper would be better than special 
case rarely exercized ssh programs in the source code.

Ciao,
Dscho

  reply	other threads:[~2008-07-20 22:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-19 17:06 [PATCH] Ensure that SSH runs in non-interactive mode Fredrik Tolf
2008-07-19 17:52 ` Mike Hommey
2008-07-19 17:57 ` Keith Packard
2008-07-19 18:18   ` Fredrik Tolf
2008-07-20 10:27     ` Johannes Schindelin
2008-07-20 17:49       ` Fredrik Tolf
2008-07-20 18:33         ` Johannes Schindelin
2008-07-20 18:42           ` Fredrik Tolf
2008-07-20 18:23       ` Junio C Hamano
2008-07-20 18:57         ` Johannes Schindelin
2008-07-20 19:51           ` Junio C Hamano
2008-07-20 22:17             ` Johannes Schindelin [this message]
2008-07-21  5:07             ` Steffen Prohaska
2008-07-21  0:14         ` Jeff King
2008-07-21  6:53           ` Mike Hommey
2008-07-21  7:05             ` Jeff King

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=alpine.DEB.1.00.0807210012480.3305@eeepc-johanness \
    --to=johannes.schindelin@gmx.de \
    --cc=edwardzyang@thewritingpot.com \
    --cc=fredrik@dolda2000.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=keithp@keithp.com \
    --cc=prohaska@zib.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox