diff options
| author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-02-12 12:51:35 +0000 |
|---|---|---|
| committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-02-12 12:51:35 +0000 |
| commit | c86553cd836b7be3948ace41ef47f85776a48a97 (patch) | |
| tree | d35d20e89504f3ee39f991bbf24d1034b600b929 /app/models | |
| parent | ddbb3c3016fa7ad6cea6d2d4e9086c98f9337e00 (diff) | |
| parent | 70df6055356ccc1cc1d8c8199e9b23d171d045f4 (diff) | |
| download | gitlab-ce-c86553cd836b7be3948ace41ef47f85776a48a97.tar.gz | |
Merge branch 'refactor_compare' into 'master'
Refactor Compare logic
Updated gitlab_git to version 5.4.0.
Fixes MR diff download link in case of huge diff.
Fixes #1026
Diffstat (limited to 'app/models')
| -rw-r--r-- | app/models/merge_request_diff.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/app/models/merge_request_diff.rb b/app/models/merge_request_diff.rb index 3ea610197e6..a226fef7346 100644 --- a/app/models/merge_request_diff.rb +++ b/app/models/merge_request_diff.rb @@ -148,13 +148,11 @@ class MergeRequestDiff < ActiveRecord::Base Gitlab::Git::Diff.between(repository, source_branch, target_branch) end - if diffs == broken_diffs - self.state = :timeout - diffs = [] - end - diffs ||= [] diffs + rescue Gitlab::Git::Diff::TimeoutError => ex + self.state = :timeout + diffs = [] end def repository |
