ef-labs / stash-hook-mirror

An Atlassian Stash repository hook for mirroring to one or more remote git repositories.
MIT License
77 stars 58 forks source link

Sync internal Stash-Repo to GitHub -> what happens in case of pull requests? #30

Open drauch opened 9 years ago

drauch commented 9 years ago

I take it, that this is not a two-way mirror. So what happens if we accept a pull request on GitHub? Sounds like the mirror would need to force push then? Is that assumption true? As soon as someone pushes something else to the mirror-repository it stops working?

drauch commented 9 years ago

No comments? Is this plugin no longer maintained?

adrianluisgonzalez commented 9 years ago

Correct, it is not a two mirror.

An example git mirror command is:

git push --prune git@github.com:englishtown/stash-hook-mirror.git --force +refs/heads/*:refs/heads/* +refs/tags/*:refs/tags/*

https://github.com/englishtown/stash-hook-mirror/blob/develop/src/main/java/com/englishtown/stash/hook/MirrorRepositoryHook.java#L127