jesseduffield.lazygit/test/integration/rememberCommitMessageAfterFail/setup.sh

21 lines
295 B
Bash

#!/bin/sh
cd $1
git init
git config user.email "CI@example.com"
git config user.name "CI"
git checkout -b master
echo "test" > file1
echo "disruptive" > disruptive
cat > .git/hooks/pre-commit <<EOL
#!/bin/bash
if [ -f disruptive ]; then
exit 1
fi
exit 0
EOL
chmod +x .git/hooks/pre-commit