summaryrefslogtreecommitdiff
path: root/app/models/project.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/project.rb')
-rw-r--r--app/models/project.rb5
1 files changed, 1 insertions, 4 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index 95ad88c76ae..6f5d592755a 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -801,10 +801,7 @@ class Project < ActiveRecord::Base
end
def change_head(branch)
- # Cached divergent commit counts are based on repository head
- repository.expire_branch_cache
- repository.expire_root_ref_cache
-
+ repository.before_change_head
gitlab_shell.update_repository_head(self.path_with_namespace, branch)
reload_default_branch
end