Re: [PATCH 06/12] connect: Fix custom ports with plink (Putty's ssh)
- From
- Clifford Caoile <piyo@users.sourceforge.net>
- Date
- Jul 4, 2008, 16:09 UTC
- Message-ID
- <1f748ec60807040909r4022d714s4487f5991f6020dc@mail.gmail.com>
- In-Reply-To
- <7188A895-D5B9-480E-8486-8A69B8861646@zib.de>
Hi:
On Fri, Jul 4, 2008 at 6:29 PM, Steffen Prohaska <prohaska@zib.de> wrote:
Show 20 quoted lines
> > On Jul 4, 2008, at 11:18 AM, Junio C Hamano wrote: > >> Johannes Sixt <johannes.sixt@telecom.at> writes: >> >>> What about installing a wrapper script, plinkssh, that does this: >> >> That's quite a nice solution with absolute minimum impact. > > It has minimum impact on the source code of git. The same is not > true, however, for the git user and the installer on Windows: > > - The proposed plinkssh requires that plink is in the PATH. This is > not necessarily the case on Windows. If plink is not in the PATH, > then the user needs to modify plinkssh. > > - The msysgit installer supports setting GIT_SSH to the full path > of plink. It automatically detects this path based on Putty's > entries in the Windows registry. If we choose the plinkssh > solution the installer has to be modified.
How about we create one more global environment variable MSYSGIT_REAL_PLINK which points to the Windows plink during installation? Then we set the GIT_SSH to the plinkssh, and the proposed plinkssh can point to MSYSGIT_REAL_PLINK?
+ # fall back to plink if MSYSGIT_REAL_PLINK is not defined
+ # and hope plink is in the path
+ plink=${MSYSGIT_REAL_PLINK:-plink}- exec plink $port "$@"
+ exec ${plink} $port "$@"Perhaps I have traded one problem for another, because the msysgit user still has to be aware of MSYSGIT_REAL_PLINK (at least she doesn't have to set it up). And of course, the installer has to be modified to accommodate plinkssh and my proposal.
Best regards, Clifford Caoile