aboutsummaryrefslogtreecommitdiff
path: root/t/lib-credential.sh
diff options
context:
space:
mode:
authorBen Walton <bdwalton@gmail.com>2014-09-29 08:02:07 +0100
committerJunio C Hamano <gitster@pobox.com>2014-09-29 09:06:52 -0700
commitc049216fdf8cbbe93edf107800519739f4bcf56d (patch)
tree87685fbafd3c7c8137add9e26305da34803269df /t/lib-credential.sh
parent62b553cdd6cd41d60b3e0c6fe4a85a951712df97 (diff)
downloadgit-c049216fdf8cbbe93edf107800519739f4bcf56d.tar.gz
git-c049216fdf8cbbe93edf107800519739f4bcf56d.tar.xz
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>
Diffstat (limited to 't/lib-credential.sh')
-rwxr-xr-xt/lib-credential.sh4
1 files changed, 1 insertions, 3 deletions
diff --git a/t/lib-credential.sh b/t/lib-credential.sh
index 9e7d7962b..d8e41f7dd 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