summaryrefslogtreecommitdiffstats
path: root/modules/tozt
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-10-04 06:41:36 -0400
committerJesse Luehrs <doy@tozt.net>2019-10-04 06:41:36 -0400
commit762fd855c3d74fe7e0c82a280e2b315f8bf30add (patch)
tree29808e8713b42a35752dae600ff92a4e50005b00 /modules/tozt
parentab12fd67ea95ea1678a9b43a6dc92fc8c34df6b6 (diff)
downloadpuppet-tozt-762fd855c3d74fe7e0c82a280e2b315f8bf30add.tar.gz
puppet-tozt-762fd855c3d74fe7e0c82a280e2b315f8bf30add.zip
no, i do need to use --mirror
Diffstat (limited to 'modules/tozt')
-rwxr-xr-xmodules/tozt/files/post-receive13
1 files changed, 9 insertions, 4 deletions
diff --git a/modules/tozt/files/post-receive b/modules/tozt/files/post-receive
index f7a4823..9d909a4 100755
--- a/modules/tozt/files/post-receive
+++ b/modules/tozt/files/post-receive
@@ -5,7 +5,12 @@ set -o pipefail
mkdir -p info/web
git for-each-ref --sort=committerdate --format='%(committerdate)' refs/heads | tail -n1 > info/web/last-modified
-git push --all github
-git push --tags github
-git push --all gitlab
-git push --tags gitlab
+# XXX github accepts pushes of things under refs/remotes (and presumably just
+# ignores them), but gitlab throws an error when you do this. as far as i can
+# tell though, --mirror is the only way to keep the list of branches in sync
+# (like, delete remote branches when the local branch is deleted, etc), and
+# there's no way to configure the set of refs when using --mirror, so this is
+# probably the best i can do for now
+rm -rf refs/remotes
+git push --mirror gitlab
+git push --mirror github