add a comment on how to specify several branches to be handled by git-slave.sh
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Mon, 3 Jun 2013 15:33:52 +0000 (17:33 +0200)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Mon, 3 Jun 2013 15:33:52 +0000 (17:33 +0200)
scripts/git-slave.sh

index 470044f..b2c0008 100755 (executable)
 # Typical usage in cron
 # */3 * * * * /root/bin/git-slave.sh -q /git-slave/*.git
 
+# you might wish to tweak the repo's config, in particular the remote section
+# so as to define the proper mappings for your needs
+# e.g. from git.onelab.eu:/git-slave/rvm-rpm.git
+#[remote "origin"]
+#      url = https://github.com/cdwertmann/rvm-rpm.git
+#      fetch = refs/heads/*:refs/heads/*
 function slave_repo () {
     git_slave=$1; shift
     cd $git_slave
-    git fetch -q
+    git fetch --all --tags -q
 }
 
 for slave_dir in "$@"; do slave_repo $slave_dir; done