chiark / gitweb /
auditor wip before output
[dgit-junk.git] / copy-alioth-to-gideon
index 6a3ff9e..81e2421 100755 (executable)
@@ -12,7 +12,7 @@ ssh iwj@gideon.debian.org "
        mkdir -p transfer.tmp
        cd transfer.tmp
 
        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 \
 
        find \(         \( ! -type f ! -type d \) \
                -o      -perm +5002 -o \! -perm +2555 \
@@ -44,6 +44,17 @@ ssh iwj@gideon.debian.org "
                 if [ "x$master" = x ] && [ "x$sid" != x ]; then
                        git update-ref refs/heads/master refs/dgit/sid
                 fi)
                 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 <<END >$d/transfer.run
        done
 
        cat <<END >$d/transfer.run