ssh test: make copy_ssh_wrapper_as clean up after itself
commit8339805b467ca5b2d9314fdbfdd75a6e96c6b39a
authorJonathan Nieder <jrnieder@gmail.com>
Tue, 21 Nov 2017 01:49:19 +0000 (20 17:49 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 21 Nov 2017 05:00:48 +0000 (21 14:00 +0900)
treeaafbb30cee253126a69cfbebb5071d1e4772ceeb
parent6464679d9620d91b639e2681b9cc6473f3856d09
ssh test: make copy_ssh_wrapper_as clean up after itself

Simplify by not allowing the copied ssh wrapper to persist between
tests.  This way, tests can be safely reordered, added, and removed
with less fear of hidden side effects.

This also avoids having to call setup_ssh_wrapper to restore the value
of GIT_SSH after this battery of tests, since it means each test will
restore it individually.

Noticed because on Windows, if `uplink.exe` exists, the MSYS2 Bash
will overwrite that when redirecting via `>uplink`.  A proposed test
wrote a script to 'uplink' after a previous test created uplink.exe
using copy_ssh_wrapper_as, so the script written with '>uplink' had
the wrong filename and failed.

Reported-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5601-clone.sh