redmine-git-hosting / redmine_git_hosting

A Redmine plugin which makes configuring your own Git hosting easy ;)
http://redmine-git-hosting.io
MIT License
275 stars 116 forks source link

Do not update repository on “non git” user profile changes #79

Closed baby-gnu closed 11 years ago

baby-gnu commented 11 years ago

Hello,

In our redmine we have 200+ repositories, I just change my language configuration and it take quite some time.

The logs show me that all the repositories are updated.

Is it possible to restrict repository trigger to git related parameters?

Regards.

n-rodriguez commented 11 years ago

It's already the case. In lib/githosting/git_hosting.rb, line 951

git_projects = projects.uniq.select{|p| p.gitolite_repos.any?}
return if git_projects.empty?
baby-gnu commented 11 years ago

Going into My account and changing my language to auto took 44 seconds with the following in git_hosting.log:

2013-09-27 15:39:05 +0200 INFO [GitHosting] ["Updating key directory for projects : 'p1, p2,...'"]
2013-09-27 15:39:12 +0200 INFO [GitHosting] ["Using existing Gitolite repository : 'repositories/redmine/p1.git' for update"]
2013-09-27 15:39:12 +0200 INFO [GitHosting] ["Using existing Gitolite repository : 'repositories/redmine/p2.git' for update"]
[...]
2013-09-27 15:39:49 +0200 INFO [GitHosting] ["Using existing Gitolite repository : 'repositories/redmine/p203.git' for update"]
2013-09-27 15:39:49 +0200 INFO [GitHosting] ["Committing changes to Gitolite Admin repository"]

And I got a commit in my <tmp>/redmine_git_hosting/git/gitolite-admin:

commit 208c04947a3d0b7acdcdc38eacc0515b576935ae
Author: Redmine <admineole@ac-dijon.fr>
Date:   Fri Sep 27 15:39:49 2013 +0200

    Updated by Redmine

But I do not edit my SSH key, only my language.

Regards.

n-rodriguez commented 11 years ago

So baby-gnu est francais cocorico! ;)

I'm aware that the current implementation can lead to that kind of 'bug' with some performance problem. This part needs to be rework.