Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 1e597c421fa32528d2d308f1947516b6d4bdf8b3 1 parent b26ff07
drussel@SALILAB.ORG authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 tools/git/config/hooks/pre-commit
8 tools/git/config/hooks/pre-commit
View
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.