summaryrefslogtreecommitdiff
path: root/app/models/project.rb
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2016-03-21 14:42:25 +0000
committerRobert Speicher <robert@gitlab.com>2016-03-21 14:42:25 +0000
commitffc3acd498e5cfeb98f6104421cba32acdd7ee64 (patch)
tree7127c4a4b0221703dce53948d8de48bb2dd152bc /app/models/project.rb
parent3fca30d27f90a52bdbca746b1244c95e6c7db2d2 (diff)
parent75aaf91cb1d08c4350e2881b18118faf30e1f310 (diff)
downloadgitlab-ce-ffc3acd498e5cfeb98f6104421cba32acdd7ee64.tar.gz
Merge branch 'issues-show-performance' into 'master'
Improve performance of viewing individual issues This MR does two things: 1. `Issue#related_branches` no longer performs Git operations that aren't needed 2. The output of `Repository#exists?` is now cached and flushed properly Combined these two changes should further cut down the amount of Git operations performed when viewing individual issues (and possibly other pages). See merge request !3296
Diffstat (limited to 'app/models/project.rb')
-rw-r--r--app/models/project.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index 412c6c6732d..fd36dca0cad 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -876,6 +876,7 @@ class Project < ActiveRecord::Base
# Forked import is handled asynchronously
unless forked?
if gitlab_shell.add_repository(path_with_namespace)
+ repository.after_create
true
else
errors.add(:base, 'Failed to create repository via gitlab-shell')