From 3cb6b32bd1d3ab99f146bf08b60fab13234d8321 Mon Sep 17 00:00:00 2001 From: Xavier Shay Date: Mon, 7 Apr 2014 12:38:29 -0700 Subject: [PATCH] Add --force option when pushing. --- .../java/com/englishtown/stash/hook/MirrorRepositoryHook.java | 1 + 1 file changed, 1 insertion(+) 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)