Skip to content

Commit

Permalink
t/lib-credential: use write_script
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
bdwalton authored and gitster committed Sep 29, 2014
1 parent 62b553c commit c049216
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions t/lib-credential.sh
Expand Up @@ -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

0 comments on commit c049216

Please sign in to comment.