zulip/tools/post-commit
Tim Abbott ddbb3a37fb Allow committing with dropbox.com email addresses.
Later we can remove the ability to commit with older emails.

(imported from commit fe44cc1ffcc79f3c393e3a84c15741130605d3ec)
2014-04-29 10:55:12 -07:00

10 lines
462 B
Bash
Executable File

#!/bin/bash
AUTHOR=$(git log -1 HEAD | grep ^Author | sed 's/Author: //')
if ! $(echo "$AUTHOR" | egrep '(humbughq|zulip|dropbox)\.com' >/dev/null); then
echo -e "\e[0;91m Invalid non-Zulip commit author: $AUTHOR\e[0m"
fi
COMMITTER=$(git log -1 HEAD --pretty=fuller | grep ^Commit: | sed 's/Author: //')
if ! $(echo "$COMMITTER" | egrep '(humbughq|zulip|dropbox)\.com' >/dev/null); then
echo -e "\e[0;91m Invalid non-Zulip committer: $COMMITTER\e[0m"
fi