X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit-junk.git;a=blobdiff_plain;f=copy-alioth-to-gideon;h=81e2421b3d1f79109de28300da61dede2bdf910f;hp=3709ee0c635c7bfab8521622b6c95c4c0ce7fdcf;hb=9f63cef14f7581cabba2ccfd4ac4d23ccabe5042;hpb=dc877814fd92ba8dfaad3956252f32c3bc6cd971;ds=sidebyside diff --git a/copy-alioth-to-gideon b/copy-alioth-to-gideon index 3709ee0..81e2421 100755 --- a/copy-alioth-to-gideon +++ b/copy-alioth-to-gideon @@ -12,7 +12,7 @@ ssh iwj@gideon.debian.org " mkdir -p transfer.tmp cd transfer.tmp - rsync -rltHxp --delete iwj@git.debian.org:/git/dgit-repos/repos/. . + rsync -rltHxp --delete iwj@git.debian.org:/git/dgit-repos/repos.now-on-gideon/. . find \( \( ! -type f ! -type d \) \ -o -perm +5002 -o \! -perm +2555 \ @@ -38,6 +38,23 @@ ssh iwj@gideon.debian.org " for f in $d/transfer.tmp/*.git; do cp $d/repos/_template/description $f/description touch $f/git-daemon-export-ok + (export GIT_DIR=$f + master=`git for-each-ref "[r]efs/heads/master"` + sid=`git for-each-ref "[r]efs/dgit/sid"` + if [ "x$master" = x ] && [ "x$sid" != x ]; then + git update-ref refs/heads/master refs/dgit/sid + fi) + (export GIT_DIR=$f + git for-each-ref --format="%(refname)" | while read r; do + case "$r" in + refs/heads/master) ;; + refs/tags/debian/*) ;; + refs/dgit/*) ;; + *) + git update-ref -d "$r" + ;; + esac + done) done cat <$d/transfer.run