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.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index eadc42d1da5..b1a6cfa86af 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -775,6 +775,8 @@ class Project < ActiveRecord::Base
end
def change_head(branch)
+ # Cached divergent commit counts are based on repository head
+ repository.expire_branch_cache
gitlab_shell.update_repository_head(self.path_with_namespace, branch)
reload_default_branch
end