Permalink
Browse files

pta hook: avoid spurious error messages on old fragments

  • Loading branch information...
1 parent 616d8a5 commit 3c960aa5e1a6a692b811b4c76b5c414b810dcab3 Sitaram Chamarty committed Oct 4, 2009
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/pta-hook.sh
View
@@ -7,8 +7,12 @@ export GL_ADMINDIR=/home/git/.gitolite
# checkout the master branch to $GL_ADMINDIR
GIT_WORK_TREE=$GL_ADMINDIR git checkout -f master
+# remove all fragments. otherwise, you get spurious error messages when you
+# take away someone's delegation in the main config but the fragment is still
+# hanging around. The ones that are valid will get re-created anyway
+rm -rf $GL_ADMINDIR/conf/fragments
# collect all the delegated fragments
-mkdir -p $GL_ADMINDIR/conf/fragments
+mkdir $GL_ADMINDIR/conf/fragments
for br in $(git for-each-ref --format='%(refname:short)')
do
# skip master (duh!)

0 comments on commit 3c960aa

Please sign in to comment.