Browse Source

Add --force option when pushing.

pull/21/head
Xavier Shay 11 years ago
parent
commit
3cb6b32bd1
  1. 1
      src/main/java/com/englishtown/stash/hook/MirrorRepositoryHook.java

1
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)

Loading…
Cancel
Save