diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2016-01-27 17:19:37 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-01-27 14:27:19 -0800 |
commit | 3064d5a38c72532e603faed4c63042b375ded2c7 (patch) | |
tree | 5da20da0aed274d32730f5aa57c7427f1aefe5d4 /t/t5601-clone.sh | |
parent | 4b0abd5c695c87bf600e57b6a5c7d6844707d34c (diff) | |
download | git-3064d5a38c72532e603faed4c63042b375ded2c7.tar.gz git-3064d5a38c72532e603faed4c63042b375ded2c7.tar.xz |
mingw: fix t5601-clone.sh
Since baaf233 (connect: improve check for plink to reduce false
positives, 2015-04-26), t5601 writes out a `plink.exe` for testing that
is actually a shell script. So the assumption that the `.exe` extension
implies that the file is *not* a shell script is now wrong.
Since there was no love for the idea of allowing `.exe` files to be
shell scripts on Windows, let's go the other way round: *make*
`plink.exe` a real `.exe`.
This fixes t5601-clone.sh in Git for Windows' SDK.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5601-clone.sh')
-rwxr-xr-x | t/t5601-clone.sh | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh index 9b34f3c61..e40fc2673 100755 --- a/t/t5601-clone.sh +++ b/t/t5601-clone.sh @@ -4,6 +4,9 @@ test_description=clone . ./test-lib.sh +X= +test_have_prereq !MINGW || X=.exe + test_expect_success setup ' rm -fr .git && @@ -282,14 +285,9 @@ test_expect_success 'clone checking out a tag' ' setup_ssh_wrapper () { test_expect_success 'setup ssh wrapper' ' - write_script "$TRASH_DIRECTORY/ssh-wrapper" <<-\EOF && - echo >>"$TRASH_DIRECTORY/ssh-output" "ssh: $*" && - # throw away all but the last argument, which should be the - # command - while test $# -gt 1; do shift; done - eval "$1" - EOF - GIT_SSH="$TRASH_DIRECTORY/ssh-wrapper" && + cp "$GIT_BUILD_DIR/test-fake-ssh$X" \ + "$TRASH_DIRECTORY/ssh-wrapper$X" && + GIT_SSH="$TRASH_DIRECTORY/ssh-wrapper$X" && export GIT_SSH && export TRASH_DIRECTORY && >"$TRASH_DIRECTORY"/ssh-output @@ -297,8 +295,8 @@ setup_ssh_wrapper () { } copy_ssh_wrapper_as () { - cp "$TRASH_DIRECTORY/ssh-wrapper" "$1" && - GIT_SSH="$1" && + cp "$TRASH_DIRECTORY/ssh-wrapper$X" "${1%$X}$X" && + GIT_SSH="${1%$X}$X" && export GIT_SSH } |