summaryrefslogtreecommitdiff
path: root/app/models/merge_request_diff.rb
Commit message (Collapse)AuthorAgeFilesLines
* Added Cop to blacklist the use of serializedocument-not-using-serializeYorick Peterse2017-05-311-2/+2
| | | | | This Cop blacklists the use of ActiveRecord's "serialize" method, except for cases where we already use this.
* Merge branch 'dm-diff-cleanup' into 'master'Robert Speicher2017-05-251-0/+23
|\ | | | | | | | | Clean up diff rendering See merge request !11390
| * Change code comment formattingdm-diff-cleanupDouwe Maan2017-05-231-1/+3
| |
| * Remove @commit in compare and MR controllersDouwe Maan2017-05-231-0/+3
| |
| * Pass fallback_diff_refs to Diff::File instead of using view helpersDouwe Maan2017-05-231-0/+18
| |
* | Add system note with link to diff comparison when MR discussion becomes outdatedDouwe Maan2017-05-231-3/+2
|/
* Show correct size when MR diff overflowsSean McGivern2017-04-251-1/+1
| | | | | | | The problem is that we often go via a diff object constructed from the diffs stored in the DB. Those diffs, by definition, don't overflow, so we don't have access to the 'correct' `real_size` - that is stored on the MR diff object iself.
* Statisfy Robertcop and Seancopdm-outdated-diff-linkDouwe Maan2017-04-111-9/+3
|
* Add specsDouwe Maan2017-04-101-0/+12
|
* Fix find_by_diff_refsDouwe Maan2017-04-081-1/+1
|
* Fix specs and make tweaksDouwe Maan2017-04-081-1/+4
|
* Link to outdated diff in older MR version from outdated diff discussionDouwe Maan2017-04-081-0/+1
|
* Fix issues importing forked projectsJames Lopez2017-04-041-8/+10
|
* Revert "Enable Style/DotPosition"Douwe Maan2017-02-231-2/+2
| | | | | | | | | | | | | | | This reverts commit e00fb2bdc2090e9cabeb1eb35a2672a882cc96e9. # Conflicts: # .rubocop.yml # .rubocop_todo.yml # lib/gitlab/ci/config/entry/global.rb # lib/gitlab/ci/config/entry/jobs.rb # spec/lib/gitlab/ci/config/entry/factory_spec.rb # spec/lib/gitlab/ci/config/entry/global_spec.rb # spec/lib/gitlab/ci/config/entry/job_spec.rb # spec/lib/gitlab/ci/status/build/factory_spec.rb # spec/lib/gitlab/incoming_email_spec.rb
* Revert "Prefer leading style for Style/DotPosition"Douwe Maan2017-02-231-2/+2
| | | | This reverts commit cb10b725c8929b8b4460f89c9d96c773af39ba6b.
* Prefer leading style for Style/DotPositionDouwe Maan2017-02-231-2/+2
|
* Enable Style/MutableConstantDouwe Maan2017-02-231-1/+1
|
* Enable Style/DotPositionDouwe Maan2017-02-231-2/+2
|
* Merge remote-tracking branch 'upstream/master' into ↵Lin Jen-Shin2017-01-261-11/+11
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix-git-hooks-when-creating-file * upstream/master: (1122 commits) Update CHANGELOG.md for 8.16.2 Display project ID in project settings (!8572) fixed points from comments to improve code quality Update CHANGELOG.md for 8.14.8 Statisfy eslint Add CHANGELOG entry Fix access to the wiki code via HTTP when repository feature disabled Display fullscreen button on small screens (!5302) Prevent removing fields from dropdowns on input elements fix for all themes Return struct instead of multiple values Fix race conditions for AuthorizedProjectsWorker Add User#nested_groups and User#nested_projects methods Fix spec failure due to timestamp ordering issue in mySQL Fixed error with filter keyboard tests `can?` already includes the `feature_available?` check Test there is no Merge Request button when MRs are disabled Ensure the correct Merge Request button is found Add 409 conflict tests Add CHANGELOG ...
| * Merge branch 'issue_25017' into 'master' Sean McGivern2017-01-171-10/+10
| |\ | | | | | | | | | | | | | | | | | | Show 'too many changes' message for merge request Closes #25017 See merge request !8444
| | * Show 'too many changes' message for merge requestissue_25017Felipe Artur2017-01-121-10/+10
| | |
| * | Absorb gitlab_gitRobert Speicher2017-01-041-1/+1
| |/
* | Prefer leading dots over trailing dotsLin Jen-Shin2017-01-061-2/+2
| |
* | Introduce Repository#with_tmp_ref which we needLin Jen-Shin2016-12-081-1/+2
|/ | | | | commits from the other repository. We'll cleanup the tmp ref after we're done with our business.
* Replace references to MergeRequestDiff#commits with st_commitsuse-st-commits-where-possibleAdam Niedzielski2016-12-011-5/+5
| | | | | | when we care only about the number of commits We do not have to instantiate all objects in this case.
* Hide empty merge request diffs when comparing versionsAdam Niedzielski2016-11-211-2/+4
|
* Also keep commits from source_project around, feedback:Lin Jen-Shin2016-10-251-3/+5
| | | | https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6658#note_17190236
* Refactor straight compare diff codeDmitriy Zaporozhets2016-10-121-2/+2
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Improve tests for merge request diff modelDmitriy Zaporozhets2016-10-121-1/+1
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Use straight diff approach when compare merge request versionsDmitriy Zaporozhets2016-10-121-2/+5
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Fix Error 500 when viewing old merge requests with bad diff datash-fix-issue-20776Stan Hu2016-10-101-1/+13
| | | | | | | | | Customers running old versions of GitLab may have MergeRequestDiffs with the text ["--broken diff"] due to text generated by gitlab_git 1.0.3. To avoid the Error 500, verify that each element is a type that gitlab_git will accept before attempting to create a DiffCollection. Closes #20776
* So that st_commits could never be nilLin Jen-Shin2016-09-221-4/+6
|
* For empty merge_request_diff st_commits would be nilfix-pipeline-for-empty-merge-request-diffLin Jen-Shin2016-09-221-1/+3
| | | | Closes #22438
* Show all pipelines from all merge_request_diffs:Lin Jen-Shin2016-09-191-0/+8
| | | | | This way we could also show pipelines from commits which were discarded due to a force push.
* Refactor merge request version compare featureDmitriy Zaporozhets2016-09-071-0/+4
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Change the way merge request diff compare worksdz-merge-request-versionDmitriy Zaporozhets2016-08-251-18/+6
| | | | | | | * remove ref fetch (we do it during creation anyway) * remove safe_head_commit_sha for diff compare (do not depend on the source branch) Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Add code improvements to merge request version featureDmitriy Zaporozhets2016-08-251-8/+8
| | | | | | | * Add MergeRequestDiff#latest? * Remove unnecessary variable assignment Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Make sure merge request is fetched before collecting base sha in merge ↵Dmitriy Zaporozhets2016-08-191-0/+1
| | | | | | request diff Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Fix and refactor merge request diff_refs methodDmitriy Zaporozhets2016-08-151-1/+1
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Make merge request diff works with new FileCollection logicDmitriy Zaporozhets2016-08-151-5/+9
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Merge branch 'master' into dz-merge-request-versionDmitriy Zaporozhets2016-08-151-4/+8
|\ | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
| * Enable Style/SpaceAroundEqualsInParameterDefault coprubocop/SpaceAroundEqualsInParameterDefaultGabriel Mazetto2016-08-061-1/+1
| |
| * change the API on the merge_request_diff model from diffs -> raw_diffsuse-raw-diffs-for-merge-request-diffsPaco Guzman2016-08-031-5/+5
| |
| * Speedup DiffNote#active? on discussions, preloading noteables and avoid ↵Paco Guzman2016-08-021-0/+4
| | | | | | | | | | | | | | | | | | | | | | touching git repository to return diff_refs when possible - Preloading noteable we share the same noteable instance when more than one discussion refers to the same noteable. - Any other call to that object that is cached in that object will be for any discussion. - In those cases where merge_request_diff has all the sha stored to build a diff_refs get that diff_refs using directly those sha instead accessing to the git repository to first get the commits and later the sha.
* | Fix merge request diff create and head_commit_sha compatibilityDmitriy Zaporozhets2016-08-151-3/+14
| | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | Change the way old merge request diff handledDmitriy Zaporozhets2016-08-151-11/+18
| | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | Load merge request versions without loading whole diff from databaseDmitriy Zaporozhets2016-08-091-0/+4
| | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | Chnage the way how merge request diff is initialized and savedDmitriy Zaporozhets2016-08-021-23/+31
| | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | Add more tests to merge_request_diff and improve initializeDmitriy Zaporozhets2016-08-021-3/+1
| | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | Refactor MergeRequestDiff initialize methodDmitriy Zaporozhets2016-08-021-16/+12
| | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>