Commit graph

10 commits

Author SHA1 Message Date
GitLab Bot
006e89697d Add latest changes from gitlab-org/gitlab@master 2020-02-12 21:08:48 +00:00
GitLab Bot
4b28d5ae77 Add latest changes from gitlab-org/gitlab@master 2019-10-09 21:06:24 +00:00
Hiroyuki Sato
ce46b40252 Fix encoding error in MR diffs 2019-09-10 17:02:30 +09:00
Nick Thomas
013f7cd24c
Inherit from ApplicationRecord instead of ActiveRecord::Base 2019-03-28 16:18:23 +00:00
Nick Thomas
9f05e97aad
Run rubocop -a 2019-03-13 13:42:43 +00:00
Nick Thomas
f9e41d0d85
Allow MR diffs to be placed into an object store 2019-02-05 14:12:48 +00:00
gfyoung
50abbd3e53 Enable frozen string in app/models/*.rb
Partially addresses #47424.
2018-07-26 16:55:41 -07:00
Oswaldo Ferreira
bb8f2520b4 Persist truncated note diffs on a new table
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-05-24 15:34:43 -03:00
Sean McGivern
396b8f91ec Fix saving diffs that are not valid UTF-8
Previously, we used Psych, which would:

1. Check if a string was encoded as binary, and not ASCII-compatible.
2. Add the !binary tag in that case.
3. Convert to base64.

We need to do the same thing, using a new column in place of the tag.
2017-07-26 15:34:57 +01:00
Sean McGivern
9a73b634ab Add table for files in merge request diffs
This adds an ID-less table containing one row per file, per merge request
diff. It has a column for each attribute on Gitlab::Git::Diff that is serialised
currently, with the advantage that we can easily query the attributes of this
new table.

It does not migrate existing data, so we have fallback code when the legacy
st_diffs column is present instead. For a merge request diff to be valid, it
should have at most one of:

* Rows in this new table, with the correct merge_request_diff_id.
* A non-NULL st_diffs column.

It may have neither, if the diff is empty.
2017-06-16 18:30:01 +01:00