Re: [PATCH v3 3/3] connect: improve check for plink to reduce false positives
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Apr 27, 2015, 07:57 UTC
- Message-ID
- <302f37d0837581378cc0db33499d8297@www.dscho.org>
- In-Reply-To
- <1430080212-396370-4-git-send-email-sandals@crustytoothpaste.net>
Hi,
On 2015-04-26 22:30, brian m. carlson wrote:
Show 14 quoted lines
> The git_connect function has code to handle plink and tortoiseplink > specially, as they require different command line arguments from > OpenSSH (-P instead of -p for ports; tortoiseplink additionally requires > -batch). However, the match was done by checking for "plink" anywhere > in the string, which led to a GIT_SSH value containing "uplink" being > treated as an invocation of putty's plink. > > Improve the check by looking for "plink" or "tortoiseplink" (or those > names suffixed with ".exe") only in the final component of the path. > This has the downside that a program such as "plink-0.63" would no > longer be recognized, but the increased robustness is likely worth it. > Add tests to cover these cases to avoid regressions. > > Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
I like it!
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Ciao, Dscho