#!/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
