threads / patch / 14268

patch, 12 partsRe: [PATCH 06/12] connect: Fix custom ports with plink (Putty's ssh)

Subject: Re: [PATCH 06/12] connect: Fix custom ports with plink (Putty's ssh)

## tl;dr

3 messages between Jul 3, 2008 and Jul 4, 2008. Diffs are folded; open one to read it.

replies: 2people: 2as markdown or json

Edward Z. Yang· Jul 3, 2008, 03:07 UTC · lore
Johannes Sixt wrote:
 > What about installing a wrapper script, plinkssh, that does this:
 > [snip]
Well, the patch is shorter :-)
Joking aside, it's a good question. I guess I prefer the patch because:
1. It's been tested, it works. I haven't tried the script yet, so I 
don't know if it works.
2. Git historically doesn't use bash, so the script would have to be 
rewritten in Perl or plain sh or tcl or something.
3. It's less brittle than the wrapper script if we decide to have Git 
pass more params to OpenSSH.
4. It's "more native".
I don't know if these are compelling enough reasons, though.
(cc'ed everyone else, whoops)
Johannes Schindelin· Jul 3, 2008, 12:29 UTC · re: Edward Z. Yang · lore
Hi,
On Wed, 2 Jul 2008, Edward Z. Yang wrote:
Show 5 quoted lines
> Johannes Sixt wrote:
> > What about installing a wrapper script, plinkssh, that does this:
> > [snip]
> 
> Well, the patch is shorter :-)

But you have to do it for every SSH backend that you might want to support.

And you have to recompile.
> 1. It's been tested, it works. I haven't tried the script yet, so I 
>    don't know if it works.

Sorry, that argument does not fly. "My patch is better, because I did not test your patch."

> 2. Git historically doesn't use bash, so the script would have to be 
>    rewritten in Perl or plain sh or tcl or something.

That is so totally untrue. We have Perl scripts and Shell scripts (for which we need the bash), and then we have the two GUIs which use Tcl/Tk.

Actually, we only have so few Perl scripts left that it might be possible to ship a version of Git on Windows without Perl. The only script that needs to be converted to a builtin is add -i.

The rest of the scripts are shell.
So this argument is totally bogus.
> 3. It's less brittle than the wrapper script if we decide to have Git 
>    pass more params to OpenSSH.

Granted, should we decide one day to use more elaborate features of OpenSSH, then we would have to change the script, too.

But most likely, Plink support would be broken by that update _anyway_, since it does not grok the OpenSSH options directly.

And guess what is easier to fix, a script that rewrites the arguments from OpenSSH syntax to Plink syntax, or a C program with over 78,000 code lines that has to be recompiled?

> 4. It's "more native".

Would it not be even more native if we just linked in libssl? Would you write the patch?

Further, would you like to convert and maintain all people's wrapper scripts to C code inside Git?

BTW what is the reason why Hannes' mail does not appear to be the mail you replied to in GMane, but the patch Steffen sent?

Ciao, Dscho

Edward Z. Yang· Jul 4, 2008, 20:05 UTC · re: Johannes Schindelin · lore
> Sorry, that argument does not fly.  "My patch is better, because I did not 
> test your patch."
Just tested, the patch works.
> That is so totally untrue.  We have Perl scripts and Shell scripts (for 
> which we need the bash), and then we have the two GUIs which use Tcl/Tk.

I came up with that conclusion by grepping the Git source code for the word bash; no results. Granted, it's still a null point because the proposed script doesn't use any bash-specific features.

> Further, would you like to convert and maintain all people's wrapper 
> scripts to C code inside Git?

I was under the impression that wrapper scripts were for fleshing out new APIs and implementing non-performance critical functionality, without all the overhead of writing in C. There is little to no overhead from this patch.

Anyway, Johannes still makes some pretty compelling points for the wrapper script, so you can count me +1 for the wrapper.

> BTW what is the reason why Hannes' mail does not appear to be the mail 
> you replied to in GMane, but the patch Steffen sent?

I actually did a "Reply" and so he was the only one who got the email at first. Then I resent it to the list, as well as the other CC'ed people.

(Thus my comment at the bottom)

← back to recent threads