Skip to content

Instantly share code, notes, and snippets.

View alexryabtsev's full-sized avatar

Alexander Ryabtsev alexryabtsev

  • Django Stars
  • Kiev
View GitHub Profile
@alexryabtsev
alexryabtsev / pre-commit
Created March 29, 2017 15:05 — forked from romanosipenko/pre-commit
Git pre-commit hook to check alowance of making commit acording to autors/contributors file in repository.
#!/bin/sh
REPO_ROOT=`git rev-parse --show-toplevel`
AUTHORS_FILE="AUTHORS.txt"
if grep -xq "${GIT_AUTHOR_NAME} <${GIT_AUTHOR_EMAIL}>" "${REPO_ROOT}/${AUTHORS_FILE}"
then
exit 0;
else
echo "********************************************************************************"