Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2016-10-06 16:31:52 +0300
committerFatih Acet <acetfatih@gmail.com>2016-10-06 16:31:52 +0300
commitd7dd66ed561c48e8b698d750cd4f4ea32379ad30 (patch)
tree40a584181767be7e3e748c8b1a5eec90abfbc50f /app/models
parent0a7678b58ad6f17e78086c2e320647c3a4dd461f (diff)
parentca3c0c6cd915d44ec2d409b04ab05d964bd5a403 (diff)
Merge branch 'new-merge-requests-commit-tab-active' into 'master'
MergeRequest new form load diff asynchronously ## What does this MR do? Don't return diff tab content from the server when request for a new merge request ## Are there points in the code the reviewer needs to double check? ## Why was this MR needed? To avoid 502 errors due to this controller action takes to much time ## What are the relevant issue numbers? Relates #13912 ## Screenshots (if relevant) ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - ~~[ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~ - ~~[ ] API support added~~ - Tests - [x] Added for this feature/bug - [x] All builds are passing - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5844
Diffstat (limited to 'app/models')
-rw-r--r--app/models/merge_request.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb
index 071dfe54ef9..a743bf313ae 100644
--- a/app/models/merge_request.rb
+++ b/app/models/merge_request.rb
@@ -31,7 +31,7 @@ class MergeRequest < ActiveRecord::Base
# Temporary fields to store compare vars
# when creating new merge request
- attr_accessor :can_be_created, :compare_commits, :compare
+ attr_accessor :can_be_created, :compare_commits, :diff_options, :compare
state_machine :state, initial: :opened do
event :close do
@@ -196,7 +196,7 @@ class MergeRequest < ActiveRecord::Base
end
def diff_size
- merge_request_diff.size
+ diffs(diff_options).size
end
def diff_base_commit