GitLab Bot
9ae5538691
Add latest changes from gitlab-org/gitlab@master
2025-02-04 21:07:19 +00:00
GitLab Bot
08b69d2326
Add latest changes from gitlab-org/gitlab@master
2025-01-27 21:31:26 +00:00
GitLab Bot
bac22cf644
Add latest changes from gitlab-org/gitlab@master
2024-09-19 09:12:22 +00:00
GitLab Bot
4dcdd5bebb
Add latest changes from gitlab-org/gitlab@master
2024-01-24 06:07:44 +00:00
GitLab Bot
c44eade0d7
Add latest changes from gitlab-org/gitlab@master
2023-06-16 18:09:42 +00:00
GitLab Bot
7a33080fff
Add latest changes from gitlab-org/gitlab@master
2023-06-14 15:09:43 +00:00
GitLab Bot
4958d96e26
Add latest changes from gitlab-org/gitlab@master
2023-06-06 12:07:34 +00:00
GitLab Bot
c4e4f0d167
Add latest changes from gitlab-org/gitlab@master
2022-12-24 00:07:14 +00:00
GitLab Bot
aee5750044
Add latest changes from gitlab-org/gitlab@master
2022-12-23 18:07:17 +00:00
GitLab Bot
8c2d06cba7
Add latest changes from gitlab-org/gitlab@master
2022-07-29 15:12:25 +00:00
GitLab Bot
6d05fbc478
Add latest changes from gitlab-org/gitlab@master
2022-04-04 18:08:38 +00:00
GitLab Bot
e01b61d83f
Add latest changes from gitlab-org/gitlab@master
2022-03-22 15:07:25 +00:00
GitLab Bot
3bdc719293
Add latest changes from gitlab-org/gitlab@master
2022-02-01 15:18:50 +00:00
GitLab Bot
ffb0a89712
Add latest changes from gitlab-org/gitlab@master
2021-07-08 00:17:29 +00:00
GitLab Bot
d7fd035dc3
Add latest changes from gitlab-org/gitlab@master
2021-04-12 12:09:15 +00:00
GitLab Bot
fba0e44e08
Add latest changes from gitlab-org/gitlab@master
2020-08-10 21:09:44 +00:00
GitLab Bot
23ff717a29
Add latest changes from gitlab-org/gitlab@master
2020-06-10 09:08:35 +00:00
GitLab Bot
31a432e38a
Add latest changes from gitlab-org/gitlab@master
2020-06-03 09:08:47 +00:00
GitLab Bot
40cdcdd45b
Add latest changes from gitlab-org/gitlab@master
2020-05-18 18:08:22 +00:00
GitLab Bot
ae96e65ee2
Add latest changes from gitlab-org/gitlab@master
2020-04-22 12:09:29 +00:00
GitLab Bot
1bf4fece12
Add latest changes from gitlab-org/gitlab@master
2020-04-10 00:10:04 +00:00
GitLab Bot
6b833f1e03
Add latest changes from gitlab-org/gitlab@master
2020-02-04 15:08:40 +00:00
GitLab Bot
208e2e308c
Add latest changes from gitlab-org/gitlab@master
2020-02-02 06:08:56 +00:00
GitLab Bot
79d62647bc
Add latest changes from gitlab-org/gitlab@master
2019-12-18 12:07:48 +00:00
GitLab Bot
c2b98d3dbd
Add latest changes from gitlab-org/gitlab@master
2019-12-17 15:08:15 +00:00
GitLab Bot
d10a462fed
Add latest changes from gitlab-org/gitlab@master
2019-12-16 12:07:43 +00:00
GitLab Bot
00c78fb814
Add latest changes from gitlab-org/gitlab@master
2019-10-16 15:06:17 +00:00
GitLab Bot
0a850868df
Add latest changes from gitlab-org/gitlab@master
2019-10-09 12:06:13 +00:00
GitLab Bot
c792263edf
Add latest changes from gitlab-org/gitlab@master
2019-09-23 18:06:14 +00:00
GitLab Bot
b7dfe2ae40
Add latest changes from gitlab-org/gitlab@master
2019-09-13 13:26:31 +00:00
Zeger-Jan van de Weg
469844c4f9
Update comments about N + 1 Gitaly calls
...
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.
2019-04-09 17:21:16 +02:00
Francisco Javier López
5a3e6fdff9
Fixing image lfs bug and also displaying text lfs
...
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-27 16:51:07 +01:00
Douwe Maan
5f0e4040ce
Batch load only data from same repository when lazy object is accessed
...
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.
2018-11-26 11:15:18 +01:00
Mark Chao
a4ba973e24
Allow FoundBlob to access language from gitattributes
...
Extract language_from_git_attributes as a concern so it can
ben included in two blob classes.
2018-10-30 15:44:55 +08:00
Mark Chao
bc14e4ed10
Move :plain option to Highlight class
...
This is to DRY the repeated file size check.
Move spec and constants to Highlight
2018-10-30 15:44:55 +08:00
Mark Chao
32f9cf8ce3
Add BlobPresenter for highlighting
...
Force FoundBlob to use BlobPresenter
2018-10-30 15:44:55 +08:00
Mark Chao
6580de78bb
Add access to Blob's language from gitattributes
...
Ported from Highlight class since it as a concept is more related to
blob, and this allows more flexibility.
2018-10-30 15:44:55 +08:00
Zeger-Jan van de Weg
399056ed78
Remove dependencies on Linguist
...
This saves about 128 MB of baseline RAM usage per Unicorn and
Sidekiq process (!).
Linguist wasn't detecting languages anymore from CE/EE since
9ae8b57467
. 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.
2018-10-12 17:17:30 -07:00
gfyoung
50abbd3e53
Enable frozen string in app/models/*.rb
...
Partially addresses #47424 .
2018-07-26 16:55:41 -07:00
Ken
ed0a029d53
26039 - update github-linguist to 5.3.3 version
...
26039 - add merge request id
26039 change due to lingust source file updates
2018-02-21 03:29:04 +10:30
Douwe Maan
6c4f6d3773
Include project in BatchLoader key to prevent returning blobs for the wrong project
2017-12-14 13:42:07 +01:00
Zeger-Jan van de Weg
f9565e3039
Batchload blobs for diff generation
...
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-11-21 13:53:26 +01:00
Sean McGivern
218e1f0963
Match full file path in FileDetector
...
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.
2017-10-12 11:13:37 +01:00
Douwe Maan
370bc86fb0
Detect if file that appears to be text in the first 1024 bytes is actually binary afer loading all data
2017-06-08 12:49:03 -05:00
Grzegorz Bizon
6cbe38675d
Merge branch 'dm-blob-file-type' into 'master'
...
Add Blob#file_type convenience method
See merge request !11982
2017-06-08 17:15:16 +00:00
Grzegorz Bizon
299a3a9aa0
Merge branch 'dm-empty-blob-viewer-binary' into 'master'
...
Empty blob viewer isn’t binary-only
See merge request !11979
2017-06-08 17:09:47 +00:00
Douwe Maan
369d681eec
Add Blob#file_type convenience method
2017-06-08 10:07:17 -05:00
Douwe Maan
eee712c82f
Empty blob viewer isn’t binary-only
2017-06-07 14:31:05 -05:00
Douwe Maan
dbffaaa97e
Blob#load_all_data! doesn’t need an argument
2017-06-07 14:28:33 -05:00
Douwe Maan
aed0387f97
Consistent diff and blob size limit names
2017-05-29 17:02:02 -05:00