git-update restore current branch
[infrastructure.git] / scripts / git-mirror.sh
index 6a06913..6654727 100755 (executable)
@@ -209,8 +209,8 @@ function mirror_repo () {
 # of some repositories
 # instead of hacking this script that is already scary, I preferred to write
 # a separate script git-update.sh that runs a bit like auto-update.sh
-# and that additionally takes care of remote branches
-# the layout is as follows
+# and that also takes care of remote branches
+# so the overall the layout is as follows
 # * manually created the local mirror by running
 #   cd /git-slave
 #   git clone ssh://tophat@git.top-hat.info/tophat.git
@@ -218,15 +218,12 @@ function mirror_repo () {
 # * create a symlink for git-daemon
 #   cd /git
 #   ln -s /git-slave/tophat/.git tophat.git
-# * enable updates by just dropping a symlink there
-#   cd /git-slave/tophat
-#   ln -s /root/infrastructure/scripts/git-udate.sh 
 
 function slave_repo () {
     git_slave=$1; shift
     cd $git_slave
     for subdir in *; do
-       [ -x $subdir/git-update.sh ] && $subdir/git-update.sh
+       [ -d $subdir/.git ] && git-update.sh $subdir
     done
 }