Skip to content

Instantly share code, notes, and snippets.

@ADIX7
Created March 12, 2020 09:35
Show Gist options
  • Save ADIX7/69b655a751a3a120f387a06e8dd7923d to your computer and use it in GitHub Desktop.
Save ADIX7/69b655a751a3a120f387a06e8dd7923d to your computer and use it in GitHub Desktop.
#!/bin/sh
echo $1 $2
while read local_ref local_sha remote_ref remote_sha
do
echo $local_ref $local_sha $remote_ref $remote_sha
invalid_message=$(git log --pretty=%s $remote_sha..$local_sha | grep 'fixup\|WIP')
if [ -n "$invalid_message" ]; then
echo "error: A commit szövege invalid kifejezést tartalmaz:"
echo ""
echo "$invalid_message"
echo ""
exit 1
fi
done
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment