Commit Graph

27 Commits

Author SHA1 Message Date
micael.bergeron dbaed90c8d fix refactoring error with Blob.binary?
remove some lint
2017-09-06 09:01:53 -04:00
micael.bergeron c9aa793215 revert to using a simple representation 2017-09-06 09:01:53 -04:00
micael.bergeron bca72f5906 wip: fake its a binary diff 2017-09-06 09:01:53 -04:00
Brian Neel 9770c57fab Re-enable SqlInjection and CommandInjection 2017-08-08 10:50:54 -04:00
Ahmad Sherif ef2b81adb4 Migrate DiffCollection limiting logic to Gitaly 2017-07-19 18:05:22 +02:00
Jacob Vosmaer 0b0e89ef7b Try to eliminate unused diff options 2017-07-12 18:28:29 +02:00
Ahmad Sherif 5b092d21cc Encode Gitaly diff patches properly 2017-06-22 03:12:23 +02: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
Douwe Maan 7944254563 Implement diff viewers 2017-06-14 10:12:21 -05:00
Sean McGivern 9b42be02ab Only look up diff size limit flags once per request 2017-06-09 17:21:27 +01:00
Douwe Maan 07e7ce31e3 Merge branch '31983-increase-merge-request-diff-file-size-limit-for-default-toggle-opening' into 'master'
Increase diff limits to 100 KB for collapse and 200 KB overall

Closes #31983

See merge request !11875
2017-06-05 13:58:54 +00:00
Robert Speicher 993412f9de Merge branch 'fix/use-new-gitaly-commit-diff-rpc' into 'master'
Use the new Gitaly CommitDiff RPC

See merge request !11826
2017-06-02 19:39:02 +00:00
Sean McGivern 1d3c33b57e Increase diff limits to 100 KB for collapse and 200 KB overall
This is controlled with the feature flag gitlab_git_diff_size_limit_increase.
Both of these limits were basically picked arbitrarily in the first place;
disabling the feature flag reverts to the old limits.
2017-06-02 19:37:09 +01:00
Ahmad Sherif 4d1e987ec3 Use the new Gitaly CommitDiff RPC 2017-06-02 18:33:18 +02:00
Bob Van Landuyt e564fe971f Rename `Gitlab::Git::EncodingHelper` to `Gitlab::EncodingHelper` 2017-06-01 21:21:14 +00:00
Douwe Maan 04cf618b6f Change no_limits to limits 2017-05-31 14:41:25 -05:00
Douwe Maan ce869e3964 Fix Diff#too_large? and specs 2017-05-30 21:48:30 -05:00
Douwe Maan d9461314ad Fix Diff#to_hash and #init_from_hash 2017-05-30 14:50:02 -05:00
Douwe Maan aed0387f97 Consistent diff and blob size limit names 2017-05-29 17:02:02 -05:00
Douwe Maan d9a0188d2f Add question mark to Gitlab::Diff::File predicate methods 2017-05-23 15:37:04 -05:00
Ahmad Sherif 99feed6e00 Add support for deltas_only under Gitaly
Closes gitaly#199
2017-05-13 18:27:06 +02:00
Ahmad Sherif c0a4f527db Use Gitaly for CommitController#show 2017-03-15 12:52:11 +02:00
Sean McGivern 811e598f60 Enable and autocorrect the CustomErrorClass cop 2017-03-01 15:28:10 +00:00
Robert Speicher a00578ce5c Absorb gitlab_git 2017-01-04 19:09:28 -05:00
Dmitriy Zaporozhets 4f2d2c90f7 Move Gitlab::Git out of gitlab core 2013-04-27 23:50:17 +03:00
Dmitriy Zaporozhets 14798b8e68 symbolize keys for Gitlab::Git::Diff & Gitlab::Git::Commit 2013-04-16 16:29:49 +03:00
Dmitriy Zaporozhets 5f8f685bd4 Init Gitlab::Git::Diff class 2013-04-15 19:01:02 +03:00