jesseduffield.lazygit/test/files/pre-push
Jesse Duffield b146c05578 WIP
2023-05-27 13:11:25 +10:00

23 lines
503 B
Bash
Executable file

#!/bin/bash
# test pre-push hook for testing the lazygit credentials view
#
# to enable, use:
# chmod +x .git/hooks/pre-push
#
# this will hang if you're using git from the command line, so only enable this
# when you are testing the credentials view in lazygit
read -p "Username for 'github': " username
read -p "Password for 'github': " password
echo
if [[ "$username" == "username" && "$password" == "password" ]]; then
echo "success"
exit 0
fi
echo "incorrect username/password" >&2
exit 1