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 <bdwalton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ben Walton committed Sep 29, 2014 at 08:02 UTC c049216fdf8cbbe93edf107800519739f4bcf56d
1 file changed +1 -3
t/lib-credential.sh
+1 -3
@@ -278,12 +278,10 @@ helper_test_timeout() {
278 '
279 }
280
281 -cat >askpass <<\EOF
282 -#!/bin/sh
281 +write_script askpass <<\EOF
282 echo >&2 askpass: $*
283 what=$(echo $1 | cut -d" " -f1 | tr A-Z a-z | tr -cd a-z)
284 echo "askpass-$what"
285 EOF
287 -chmod +x askpass
286 GIT_ASKPASS="$PWD/askpass"
287 export GIT_ASKPASS