Permalink
Browse files

clean up the git commit hook with regards to readmes and to disallow …

…direct commits to develop

git-svn-id: https://svn.salilab.org/imp/trunk@15412 e91f8c7b-0e32-4433-a9ac-4502d39a4eab
  • Loading branch information...
1 parent b26ff07 commit 1e597c421fa32528d2d308f1947516b6d4bdf8b3 drussel@SALILAB.ORG committed Oct 3, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 tools/git/config/hooks/pre-commit
@@ -16,12 +16,18 @@ else
fi
branch=`git status -b| grep "# On branch"| cut -f4 -d\ `
-echo "$branch"
+if test "$branch" == "develop"
+then
+ echo "Committing directly to develop is not allowed while we still have an svn repo"
+ exit 1
+fi
+
if test "$branch" \!= "develop" -a "$branch" \!= "master" -a "$branch" \!= "svn"
then
if test \! -e README.md
then
echo "ERROR: Branches that are not develop or master must have a README.md file describing them"
+ echo "ERROR: current branch is" $branch
exit 1
fi
fi

0 comments on commit 1e597c4

Please sign in to comment.