koppen / redmine_github_hook

Allow your Redmine installation to be notified when changes have been pushed to a Github repository.
http://mentalized.net/journal/2009/08/03/redmine_plugin_github_hook/
MIT License
478 stars 114 forks source link

Support to fetch with the prune option. #46

Closed yujideveloper closed 9 years ago

yujideveloper commented 11 years ago

Hello Jakob,

I added a option to git fetch with the prune option. Could you merge this?

Thanks, Yuji

koppen commented 11 years ago

Hi, thank you for your contribution. There has already been some work and discussion regarding pruning happening over at PR #42. It uses a slightly different approach than yours, what's the benefit of this pull request over the other?

Also, what exactly are the benefits of pruning?

Should it not simply be the default behavior, negating the need for settings and language files and whatnot?

yujideveloper commented 11 years ago

Hi,

Sorry, I didn`t check PR #42.

Would users expect to has been enumerated remote branches that has been removed at dropdown of repository view? I think it is not expected.

However, I think that the pruning should be implemented at optional behavior. Because it is not default behavior when fetching.

If you want to keep simply this plugin, you may be implemented the pruning as default behavior.

Thanks

wronglink commented 10 years ago

Sorry for this timeout @koppen. I've missed your question at #42. As I can see #42 and this PR do absolutely the same thing slightly different way (I added additional prune command and @yujideveloper added git fetch parameter), but they achieve the same result.

And I think that this behaviour (with pruning of deleted branches) must be enabled by default. More than that, I don't think that it is any way useful to keep deleted branches in redmine repo copy.

koppen commented 10 years ago

And I think that this behaviour (with pruning of deleted branches) must be enabled by default. More than that, I don't think that it is any way useful to keep deleted branches in redmine repo copy.

I am inclined to agree with this.

I see the Redmine-controlled repositories as copies/clones of the remote repository. They shouldn't be used for anything but giving Redmine access to the code. Thus keeping it in sync with the remote repository makes a lot of sense, hence removing branches that have been removed in the remote makes sense.

koppen commented 9 years ago

As of 122ad0e26b7682c96631d0f1d5e06640cc2131a4 pruning is the default behavior, thank you both for you contributions.