From: Ben Walton Date: Mon, 29 Sep 2014 07:02:07 +0000 (+0100) Subject: t/lib-credential: use write_script X-Git-Tag: v2.2.0-rc0~62^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c049216fdf8cbbe93edf107800519739f4bcf56d;p=git t/lib-credential: use write_script Use write_script to create the helper "askpass" script, instead of hand-creating it with hardcoded "#!/bin/sh" to make sure we use the shell the user told us to use. Signed-off-by: Ben Walton Signed-off-by: Junio C Hamano --- diff --git a/t/lib-credential.sh b/t/lib-credential.sh index 9e7d7962b0..d8e41f7ddd 100755 --- a/t/lib-credential.sh +++ b/t/lib-credential.sh @@ -278,12 +278,10 @@ helper_test_timeout() { ' } -cat >askpass <<\EOF -#!/bin/sh +write_script askpass <<\EOF echo >&2 askpass: $* what=$(echo $1 | cut -d" " -f1 | tr A-Z a-z | tr -cd a-z) echo "askpass-$what" EOF -chmod +x askpass GIT_ASKPASS="$PWD/askpass" export GIT_ASKPASS