From 6f1ab23e5e4210e8167011e0fea1e1504fdd566e Mon Sep 17 00:00:00 2001 From: Jan Sydänviita Date: Fri, 21 Aug 2026 14:35:38 +0300 Subject: Add mirror-from --- roles/jails/22_forge/files/git-shell-commands/mirror-to | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'roles/jails/22_forge/files/git-shell-commands/mirror-to') diff --git a/roles/jails/22_forge/files/git-shell-commands/mirror-to b/roles/jails/22_forge/files/git-shell-commands/mirror-to index d161283..6a0c20e 100644 --- a/roles/jails/22_forge/files/git-shell-commands/mirror-to +++ b/roles/jails/22_forge/files/git-shell-commands/mirror-to @@ -29,6 +29,11 @@ if [ -z "$REMOTE" ]; then exit 0 fi +if git remote get-url mirror-from >/dev/null 2>&1; then + echo "Error: $REPO already has a mirror-from configured. Remove it first with: mirror-from $REPO" + exit 1 +fi + if git remote get-url mirror-to >/dev/null 2>&1; then git remote set-url mirror-to "$REMOTE" else -- cgit v1.3