Commit graph

17 commits

Author SHA1 Message Date
gfyoung
ebf98f27c4 Enable even more frozen string in lib/gitlab
Enables frozen string for the following:

* lib/gitlab/fogbugz_import/**/*.rb
* lib/gitlab/gfm/**/*.rb
* lib/gitlab/git/**/*.rb
* lib/gitlab/gitaly_client/**/*.rb
* lib/gitlab/gitlab_import/**/*.rb
* lib/gitlab/google_code_import/**/*.rb
* lib/gitlab/gpg/**/*.rb
* lib/gitlab/grape_logging/**/*.rb
* lib/gitlab/graphql/**/*.rb
* lib/gitlab/graphs/**/*.rb
* lib/gitlab/hashed_storage/**/*.rb
* lib/gitlab/health_checks/**/*.rb

Partially address gitlab-org/gitlab-ce#47424.
2018-11-13 11:42:15 -08:00
Bob Van Landuyt
81f5955eb6 Move Repository#wrapped_gitaly_errors into concern
Having this in a concern allows us to reuse it for different single
purpose classes that call out to git without going through the
repository every time.
2018-10-30 15:53:46 +01:00
Jacob Vosmaer (GitLab)
3f0e6d9205 More Gitaly cleanup: fetch_ref, allow disk access blocks 2018-07-27 08:43:19 +00:00
Jacob Vosmaer
9f8326995c Partially rever "Revert "Merge branch 'gitaly-mandatory-20180703-jv' into 'master'""
This partially reverts commit 64dfe2cba1.
2018-07-06 11:43:01 +02:00
Jacob Vosmaer (GitLab)
64dfe2cba1 Revert "Merge branch 'gitaly-mandatory-20180703-jv' into 'master'"
This reverts merge request !20339
2018-07-05 10:22:04 +00:00
Jacob Vosmaer (GitLab)
78708b1932 Make more Gitaly features mandatory 2018-07-04 07:39:59 +00:00
Sean McGivern
30bca22d08 Fix 500 error when MR from fork has conflicts but worker has not run
If the ref hasn't been fetched into the target repository yet, this will fail
with a Rugged::ReferencError (assuming we're not using Gitaly). We should handle
this in the same way as a missing ref.
2018-04-06 12:16:51 +01:00
Sean McGivern
70af1e2e03 Fix 500 error when trying to resolve non-ASCII conflicts in editor
When we added caching, this meant that calling `can_be_resolved_in_ui?` didn't
always call `lines`, which meant that we didn't get the benefit of the
side-effect from that, where it forced the conflict data itself to UTF-8.

To fix that, make this explicit by separating the `raw_content` (any encoding)
from the `content` (which is either UTF-8, or an exception is raised).
2018-03-23 18:33:14 +00:00
Ahmad Sherif
b4b267b739 Migrate Repository#can_be_merged? to Gitaly 2018-01-11 16:40:13 +01:00
Alejandro Rodríguez
65e3a1e9e9 Simplify conflict resolution interface and code
- Add a Gitlab::Git::Conflict::Resolution class to encapsulate
resolution data
- Simplify conflict file collection assembly
2018-01-02 16:22:02 -03:00
Alejandro Rodríguez
0aa87bbe13 Incorporate ConflictsService.ResolveConflicts Gitaly RPC 2017-12-27 15:14:25 -03:00
Alejandro Rodríguez
351f205c05 Incorporate ConflictsService.ListConflictFiles Gitaly RPC 2017-12-27 15:12:30 -03:00
Alejandro Rodríguez
240945f87e Simplify conflict resolver interface
This does two things:
- Pass commit oids instead of `Gitlab::Git::Commit`s. We only need the
former.
- Depend on only the target repository for conflict listing. For
conflict resolution, treat one repository as a remote one so that we can
implement it as such in Gitaly.
2017-12-14 16:02:50 -03:00
Alejandro Rodríguez
359b65beac Use String#end_with? instead of String#ends_with?
The former is in Ruby's core lib, so is more flexible.
2017-12-04 16:11:54 -03:00
Alejandro Rodríguez
2286681e1c Add missing attr_accessor to Gitlab::Git::Conflict::File 2017-12-04 16:11:54 -03:00
Alejandro Rodríguez
9fdde3693b Move line code generation into Gitlab::Git
Having a distinct class just for that was a bit overkill
2017-10-12 22:13:05 -03:00
Alejandro Rodríguez
faa9bd402d Create a Gitlab::Git submodule for conlict-related files
Rename classes to (hopefully) clearer names while we're doing that.
2017-10-12 22:03:15 -03:00