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
AgeCommit message (Collapse)Author
2019-09-26Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2019-03-28Memoize old_blob and new_blob to improve performanceIgor
2019-03-21Fix diff bottom expand button appears twiceMark Chao
This is a quick fix by only append match line once when calling diff_lines_for_serializer multiple time. Also enable feature by default
2019-03-07Merge branch 'expand-diff-to-full-file' into 'master'Douwe Maan
Expand diff to entire file Closes #19054 See merge request gitlab-org/gitlab-ce!24406
2019-03-06Adds the Rubocop ReturnNil copAndrew Newdigate
This style change enforces `return if ...` instead of `return nil if ...` to save maintainers a few minor review points
2019-03-06Add option to expand diff to full filePhil Hughes
The user can also toggle between the diff changes and the full file diff. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/19054
2019-02-15Replaced part of diff file properties with diff viewerNatalia Tepluhina
- replaced file.too_large - replaced file.text - replaced file.collapsed
2018-12-27Fixing image lfs bug and also displaying text lfsFrancisco Javier López
This commit, introduced in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/23812, fixes a problem creating a displaying image diff notes when the image is stored in LFS. The main problem was that `Gitlab::Diff::File` was returning an invalid valid in `text?` for this kind of files. It also fixes a rendering problem with other LFS files, like text ones. They LFS pointer shouldn't be shown when LFS is enabled for the project, but they were.
2018-12-21Cache diff highlight in discussionsOswaldo Ferreira
This commit handles note diffs caching, which considerably improves the performance on merge requests with lots of comments. Important to note that the caching approach taken here is different from `Gitlab::Diff::HighlightCache`. We do not reset the whole cache when a new push is sent or anything else. That's because discussions diffs are persisted and do not change.
2018-12-15Merge branch '54786-mr-empty-file-display' into 'master'Nick Thomas
Display empty files properly on MR diffs Closes #54786 See merge request gitlab-org/gitlab-ce!23671
2018-12-13Allow suggesting single line changes in diffsOswaldo Ferreira
2018-12-12Display empty files properly on MR diffsSean Nichols
2018-11-12Merge branch 'osw-comment-on-any-line-on-diffs-w-feature-flag' into 'master'Douwe Maan
Comment on any expanded diff line on MRs (with feature-flag) Closes #13950 See merge request gitlab-org/gitlab-ce!22914
2018-11-09Comment on any expanded diff line on MRsOswaldo Ferreira
2018-11-08Revert "Merge branch 'osw-comment-on-any-line-on-diffs' into 'master'"Oswaldo Ferreira
This reverts commit a82a595728d54bdc12e51dfcfb22e9eddc449143, reversing changes made to e7df959b8f99875edd246c7ac7779c3203e8755e.
2018-11-07Enable even more frozen string in lib/gitlabgfyoung
Enables frozens string for the following: * lib/gitlab/conflict/**/*.rb * lib/gitlab/cross_project_access/**/*.rb * lib/gitlab/cycle_analytics/**/*.rb * lib/gitlab/data_builder/**/*.rb * lib/gitlab/database/**/*.rb * lib/gitlab/dependency_linker/**/*.rb * lib/gitlab/diff/**/*.rb * lib/gitlab/downtime_check/**/*.rb * lib/gitlab/email/**/*.rb * lib/gitlab/etag_caching/**/*.rb Partially addresses gitlab-org/gitlab-ce#47424.
2018-11-06Comment on any expanded diff line on MRsOswaldo Ferreira
2018-09-19Use standalone diff stats RPC on every comparison viewOswaldo Ferreira
2018-09-11Disable existing offenses for the CodeReuse copsYorick Peterse
This whitelists all existing offenses for the various CodeReuse cops, of which most are triggered by the CodeReuse/ActiveRecord cop.
2018-07-05Merge branch 'issue_48474' into 'master'Sean McGivern
Fix discussion entity for legacy diff notes Closes #48474 See merge request gitlab-org/gitlab-ce!20214
2018-07-04Render LegacyDiffNote when diff_file blob is nilFelipe Artur
2018-06-28Don't add bottom 'match' line for deleted filesJan Provaznik
If a file is deleted, its new_pos is 0 (less than total_blob_lines), but there is no reason to add the bottom 'match' line in this case because there is not extra content which could be expanded.
2018-06-21Changes tab VUE refactoringFelipe Artur
2018-06-05Adjust insufficient diff hunks being persisted on NoteDiffFileOswaldo Ferreira
This currently causes 500's errors when loading the MR page (Discussion) in a few scenarios. We were not considering detailed diff headers such as "--- a/doc/update/mysql_to_postgresql.md\n+++ b/doc/update/mysql_to_postgresql.md" to crop the diff. In order to address it, we're now using Gitlab::Diff::Parser, clean the diffs and builds Gitlab::Diff::Line objects we can iterate and filter on.
2018-05-24Persist truncated note diffs on a new tableOswaldo Ferreira
We request Gitaly in a N+1 manner to build discussion diffs. Once the diffs are from different revisions, it's hard to make a single request to the service in order to build the whole response. With this change we solve this problem and simplify a lot fetching this piece of info.
2018-03-16Ensure that we never assume old_blob or new_blob are nilSean McGivern
These can be a `BatchLoader` which is proxying a nil, while not being concrete nils themselves.
2018-01-04Fix error when viewing diffs without blobsSean McGivern
Old merge requests can have diffs without corresponding blobs. (This also may be possible for commit diffs in corrupt repositories.) We can't use the `&.` operator on the blobs, because the blob objects are never nil, but `BatchLoader` instances that delegate to `Blob`. We can't use `Object#try`, because `Blob` doesn't inherit from `Object`. `BatchLoader` provides a `__sync` method that returns the delegated object, but using `itself` also works because it's forwarded, and will work for non-`BatchLoader` instances too. So the simplest solution is to just use that with the `&.` operator.
2017-12-22Improve performance of DiffDiscussion#truncated_diff_lines and ↵Douwe Maan
DiffNote#diff_line by removing expensive diff position calculation and comparison
2017-11-21Batchload blobs for diff generationZeger-Jan van de Weg
After installing a new gem, batch-loader, a construct can be used to queue data to be fetched in bulk. The gem was also introduced in both gitlab-org/gitlab-ce!14680 and gitlab-org/gitlab-ce!14846, but those mrs are not merged yet. For the generation of diffs, both the old blob and the new blob need to be loaded. This for every file in the diff, too. Now we collect all these so we do 1 fetch. Three `.allow_n_plus_1_calls` have been removed, which I expect to be valid, but this needs to be confirmed by a full CI run. Possibly closes: - https://gitlab.com/gitlab-org/gitlab-ce/issues/37445 - https://gitlab.com/gitlab-org/gitlab-ce/issues/37599 - https://gitlab.com/gitlab-org/gitlab-ce/issues/37431
2017-10-13Move line code generation into Gitlab::GitAlejandro Rodríguez
Having a distinct class just for that was a bit overkill
2017-10-13Create a Gitlab::Git submodule for conlict-related filesAlejandro Rodríguez
Rename classes to (hopefully) clearer names while we're doing that.
2017-10-13Move Gitlab::Diff::LineCode to module Gitlab::GitAlejandro Rodríguez
2017-10-07Commenting on image diffsFelipe Artur
2017-09-21Migrate Gitlab::Git::Repository#diff to GitalyAhmad Sherif
Closes gitaly#524
2017-08-24Show un-highlighted diffs when blobs are the sameSean McGivern
For some old merge requests, we don't have enough information to figure out the old blob and the new blob for the file. This means that we can't highlight the diff correctly, but we can still display it without highlighting.
2017-08-22Always return a simple diff viewerSean McGivern
We didn't have a fallback case before, because we believed the conditions were exhaustive. They weren't, so we can always fallback to not previewing.
2017-07-31Remove unused (?) codeJacob Vosmaer
2017-06-14Implement diff viewersDouwe Maan
2017-06-08Move diffable? method from Repository to Diff::FileDouwe Maan
2017-05-23Pass fallback_diff_refs to Diff::File instead of using view helpersDouwe Maan
2017-05-23Rename Diff::File {old,new}_ref to {old,new}_shaDouwe Maan
2017-05-23Add question mark to Gitlab::Diff::File predicate methodsDouwe Maan
2016-11-14Fix Error 500 when creating a merge request that contains an image that was ↵Stan Hu
deleted and added Steps to reproduce: 1. Start with a repo with an image 2. Add a commit to delete the image 3. Add another commit to replace the image with another image In a diff comparison, we really just compare about what the image was before the diff, not the direct parent of the last commit. This MR fixes that. Closes #3893, gitlab-org/gitlab-ee#678 Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-11-10Fix expanding a collapsed diff when converting a symlink to a regular fileAdam Niedzielski
In this case comparing old_path and new_path is not enough because there are two entires that match.
2016-10-17Fix the diff in the merge request view when converting a symlink to a ↵Adam Niedzielski
regular file. In this specific case using file_path as a cache key is not enough, because there are two entries with the same path. Closes #21610.
2016-08-03Move to Gitlab::Diff::FileCollectionPaco Guzman
Instead calling diff_collection.count use diff_collection.size which is cache on the diff_collection
2016-08-03Cache highlighted diff lines for merge requestsPaco Guzman
Introducing the concept of SafeDiffs which relates diffs with UI highlighting.
2016-07-18Collapsed diffs lines/size don't accumulate to overflow diffs.Paco Guzman
2016-07-08Collapse large diffs by defaultSean McGivern
When rendering a list of diff files, skip those where the diff is over 10 KB and provide an endpoint to render individually instead.
2016-07-07Remove duplication, unused methods, and some other style thingsDouwe Maan