diff --git a/pom.xml b/pom.xml index 8ea73e1..646909d 100644 --- a/pom.xml +++ b/pom.xml @@ -136,6 +136,13 @@ + + + com.atlassian.maven.plugins + maven-amps-plugin + ${amps.version} + true + com.atlassian.maven.plugins maven-stash-plugin diff --git a/src/main/java/com/englishtown/stash/hook/MirrorRepositoryHook.java b/src/main/java/com/englishtown/stash/hook/MirrorRepositoryHook.java index 4db4529..baf2a74 100644 --- a/src/main/java/com/englishtown/stash/hook/MirrorRepositoryHook.java +++ b/src/main/java/com/englishtown/stash/hook/MirrorRepositoryHook.java @@ -128,6 +128,7 @@ public class MirrorRepositoryHook implements AsyncPostReceiveRepositoryHook, Rep .command("push") .argument("--prune") // this deletes locally deleted branches .argument(authenticatedUrl) + .argument("--force") // Canonical repository should always take precedence over mirror .argument("+refs/heads/*:refs/heads/*") // Only mirror heads .argument("+refs/tags/*:refs/tags/*") // and tags .errorHandler(passwordHandler)