summaryrefslogtreecommitdiff
path: root/app/models/blob.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add latest changes from gitlab-org/gitlab@15-3-stable-eev15.3.0-rc42GitLab Bot2022-08-181-2/+2
|
* Add latest changes from gitlab-org/gitlab@14-10-stable-eev14.10.0-rc42GitLab Bot2022-04-201-1/+5
|
* Add latest changes from gitlab-org/gitlab@14-8-stable-eev14.8.0-rc42GitLab Bot2022-02-181-0/+4
|
* Add latest changes from gitlab-org/gitlab@14-1-stable-eev14.1.0-rc42GitLab Bot2021-07-201-0/+1
|
* Add latest changes from gitlab-org/gitlab@13-11-stable-eev13.11.0-rc43GitLab Bot2021-04-201-0/+1
|
* Add latest changes from gitlab-org/gitlab@13-3-stable-eeGitLab Bot2020-08-201-0/+2
|
* Add latest changes from gitlab-org/gitlab@13-1-stable-eeGitLab Bot2020-06-181-0/+2
|
* Add latest changes from gitlab-org/gitlab@13-0-stable-eeGitLab Bot2020-05-201-3/+3
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-04-101-2/+0
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-02-041-8/+11
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-02-021-2/+2
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-12-181-0/+1
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-12-171-0/+1
|
* Add latest changes from gitlab-org/gitlab@masterogolowinski-master-patch-80898GitLab Bot2019-12-161-0/+1
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-10-161-0/+1
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-10-091-0/+4
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-09-231-1/+1
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-09-131-0/+2
|
* Update comments about N + 1 Gitaly callsZeger-Jan van de Weg2019-04-091-1/+1
| | | | | To make sure all known issues are linked to the correct epic, I've gone through the code base, and updated the comments where required.
* Fixing image lfs bug and also displaying text lfsFrancisco Javier López2018-12-271-5/+5
| | | | | | | | | | | 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.
* Batch load only data from same repository when lazy object is accessedDouwe Maan2018-11-261-9/+3
| | | | | | | By specifying `key`, we get a different lazy batch loader for each repository, which means that accessing a lazy object from one repository will only result in that repository's objects being fetched, not those of other repositories, saving us some unnecessary Gitaly lookups.
* Allow FoundBlob to access language from gitattributesMark Chao2018-10-301-7/+1
| | | | | Extract language_from_git_attributes as a concern so it can ben included in two blob classes.
* Move :plain option to Highlight classMark Chao2018-10-301-6/+0
| | | | | | This is to DRY the repeated file size check. Move spec and constants to Highlight
* Add BlobPresenter for highlightingMark Chao2018-10-301-1/+3
| | | | Force FoundBlob to use BlobPresenter
* Add access to Blob's language from gitattributesMark Chao2018-10-301-0/+7
| | | | | Ported from Highlight class since it as a concept is more related to blob, and this allows more flexibility.
* Remove dependencies on LinguistZeger-Jan van de Weg2018-10-121-1/+1
| | | | | | | | | | | | | | | | This saves about 128 MB of baseline RAM usage per Unicorn and Sidekiq process (!). Linguist wasn't detecting languages anymore from CE/EE since 9ae8b57467ac8b38f1fa9020a466d94a93cbb9dd. However, Linguist::BlobHelper was still being depended on by BlobLike and others. This removes the Linguist gem, given it isn't required anymore. EscapeUtils were pulled in as dependency, but given Banzai depends on it, it is now added explicitly. Previously, Linguist was used to detect the best ACE mode. Instead, we rely on ACE to guess the best mode based on the file extension.
* Enable frozen string in app/models/*.rbrepo-forks/gitlab-ce-frozen-string-enable-app-modelsgfyoung2018-07-261-0/+2
| | | | Partially addresses #47424.
* 26039 - update github-linguist to 5.3.3 versionKen2018-02-211-1/+1
| | | | | | | | 26039 - add merge request id 26039 change due to lingust source file updates
* Include project in BatchLoader key to prevent returning blobs for the wrong ↵Douwe Maan2017-12-141-3/+9
| | | | project
* Batchload blobs for diff generationZeger-Jan van de Weg2017-11-211-1/+16
| | | | | | | | | | | | | | | | | | 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
* Match full file path in FileDetectorSean McGivern2017-10-121-1/+3
| | | | | | | | | The basename appears to have been a holdover from the past - it doesn't look necessary now. Some of the regexes were unanchored on one side, so explicitly ensure that they only match the root. Apart from that, this means that pushing to foo/README.md will no longer invalidate the main README cache for a project.
* Detect if file that appears to be text in the first 1024 bytes is actually ↵dm-blob-binaryness-changeDouwe Maan2017-06-081-2/+5
| | | | binary afer loading all data
* Merge branch 'dm-blob-file-type' into 'master'Grzegorz Bizon2017-06-081-0/+4
|\ | | | | | | | | Add Blob#file_type convenience method See merge request !11982
| * Add Blob#file_type convenience methoddm-blob-file-typeDouwe Maan2017-06-081-0/+4
| |
* | Merge branch 'dm-empty-blob-viewer-binary' into 'master'Grzegorz Bizon2017-06-081-1/+1
|\ \ | |/ |/| | | | | Empty blob viewer isn’t binary-only See merge request !11979
| * Empty blob viewer isn’t binary-onlydm-empty-blob-viewer-binaryDouwe Maan2017-06-071-1/+1
| |
* | Blob#load_all_data! doesn’t need an argumentblob-load-all-dataDouwe Maan2017-06-071-0/+4
|/
* Consistent diff and blob size limit namesDouwe Maan2017-05-291-8/+4
|
* Merge branch 'dm-gemfile-viewer'Rémy Coutable2017-05-181-1/+13
|\ | | | | | | See merge request !11346.
| * Add auxiliary blob viewers to dependency filesDouwe Maan2017-05-171-1/+13
| |
* | Add auxiliary viewer for READMEdm-readme-viewerDouwe Maan2017-05-171-0/+1
|/
* Add auxiliary blob viewer for CHANGELOGDouwe Maan2017-05-171-1/+2
|
* Add auxiliary viewer for CONTRIBUTINGdm-contributing-viewerDouwe Maan2017-05-161-1/+3
|
* Implement auxiliary blob viewersDouwe Maan2017-05-101-12/+22
|
* Enable the Style/TrailingCommaInLiteral copRémy Coutable2017-05-101-1/+1
| | | | | | Use the EnforcedStyleForMultiline: no_comma option. Signed-off-by: Rémy Coutable <remy@rymai.me>
* Merge branch 'balsalmiq-support' into 'master' Phil Hughes2017-05-051-0/+1
|\ | | | | | | | | Initial balsamiq support See merge request !10564
| * Merge branch 'master' into balsalmiq-supportLuke "Jared" Bennett2017-04-301-0/+2
| |\
| * \ Merge branch 'master' into balsalmiq-supportLuke "Jared" Bennett2017-04-281-60/+118
| |\ \
| * | | BE review changesLuke "Jared" Bennett2017-04-121-1/+1
| | | |
| * | | Merge branch 'master' into 'balsalmiq-support'Luke "Jared" Bennett2017-04-121-5/+25
| |\ \ \ | | | | | | | | | | | | | | | # Conflicts: # app/models/blob.rb