Commit Graph

80 Commits

Author SHA1 Message Date
Jacob Vosmaer 144e37c667 Remove Gitlab::Git::Repository#find_all 2017-06-27 12:30:51 +02:00
Robert Speicher 826d5b7b51 Merge branch 'fix/properly-encode-gitaly-diffs' into 'master'
Encode Gitaly diff patches properly

See merge request !12368
2017-06-22 16:50:30 +00:00
Ahmad Sherif 5b092d21cc Encode Gitaly diff patches properly 2017-06-22 03:12:23 +02:00
Robert Speicher f85d0a0024 Merge branch 'feature/migrate-blob-find-to-gitaly' into 'master'
Migrate Gitlab::Git::Blob.find to Gitaly

See merge request !12104
2017-06-22 01:00:30 +00:00
Ahmad Sherif 0284f01716 Migrate Gitlab::Git::Blob.find to Gitaly 2017-06-21 17:31:20 +02:00
Grzegorz Bizon 0430b76441 Enable Style/DotPosition Rubocop 👮 2017-06-21 13:48:12 +00:00
Rémy Coutable 2a39280db0 Merge branch 'moved-submodules' into 'master'
repository: index submodules by path

See merge request !10798
2017-06-19 17:51:55 +00:00
David Turner b30c16aa32 repository: index submodules by path
Submodules have a name in the configuration, but this name is simply
the path at which the submodule was initially checked in (by default
-- the name is totally arbitrary).  If a submodule is moved, it
retains its original name, but its path changes.  Since we discover
submodules inside trees, we have their path but not necessarily their
name.

Make the submodules() function return the submodule hash indexed by
path rather than name, so that renamed submodules can be looked up.

Signed-off-by: David Turner <novalis@novalis.org>
2017-06-16 14:37:13 -04: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
Robert Speicher a6ec5121f0 Correct RSpec/SingleLineHook cop offenses 2017-06-14 13:18:56 -05:00
Douwe Maan ffbbd4112e Move diffable? method from Repository to Diff::File 2017-06-08 09:32:57 -05:00
Douwe Maan 3a5d375e49 Fix Diff::Position#diff_file for positions on straight diffs 2017-06-06 14:48:05 -05: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
Sean McGivern 04251829ba Merge branch 'dm-collapsed-blob' into 'master'
Consistent diff and blob size limit names

See merge request !11776
2017-06-01 09:10:53 +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 0c7dd30c78 Make .gitmodules parsing more resilient to syntax errors 2017-05-30 16:19:36 -05:00
Bob Van Landuyt 33aed43e9d Avoid crash when trying to parse string with invalid UTF-8 sequence 2017-05-30 15:05:52 +00:00
Douwe Maan aed0387f97 Consistent diff and blob size limit names 2017-05-29 17:02:02 -05:00
Jacob Vosmaer fcdc427972 Add test that shows DiffCollection restart bug 2017-05-23 18:45:58 +02:00
Douwe Maan 6319ca271c Merge branch 'gitaly-local-branches' into 'master'
Incorporate Gitaly's local_branches operation into repo code

Closes #27379

See merge request !10059
2017-05-18 14:22:41 +00:00
Alejandro Rodríguez 925945f01b Incorporate Gitaly's local_branches operation into repo code 2017-05-17 18:12:10 -04:00
Alejandro Rodríguez cf09c826a5 Re-enable gitaly migration for ref_name_for_sha after bugfixes 2017-05-16 11:43:37 -04:00
Rémy Coutable 3db37e0562 Enable the Style/TrailingCommaInArguments cop
Use the EnforcedStyleForMultiline: no_comma option.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-05-10 18:25:45 +02:00
Rémy Coutable d40e1f547e Enable the Style/TrailingCommaInLiteral cop
Use the EnforcedStyleForMultiline: no_comma option.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-05-10 18:25:45 +02:00
Timothy Andrew b44eaf8e07 Sort the network graph both by commit date and topographically.
- Previously, we sorted commits by date, which seemed to work okay.

- The one edge case where this failed was when multiple commits have the same
  commit date (for example: when a range of commits are cherry picked with a
  single command, they all have the same commit date [and different author
  dates]).

- Commits with the same commit date would be sorted arbitrarily, and usually
  break the network graph.

- This commit solves the problem by both sorting by date, and by sorting
  topographically (parents aren't displayed until all their children are
  displayed)

- Include review comments from @adamniedzielski

A more detailed explanation is present here:
https://gitlab.com/gitlab-org/gitlab-ce/issues/30973#note_28706230
2017-05-04 04:21:12 +00:00
Douwe Maan 185fd98fd4 Merge branch 'fix-gitaly-not-found' into 'master'
Re-enable ref operations with gitaly after not-found fix

See merge request !10773
2017-05-02 22:32:34 +00:00
Douwe Maan 2a73f0a638 Merge branch 'rs-described_class-cop-2' into 'master'
Enable `RSpec/DescribedClass` cop and correct violations

See merge request !10930
2017-05-02 22:30:30 +00:00
Alejandro Rodríguez 5e0e5801f1 Re-enable ref operations with gitaly after not-found fix 2017-05-02 17:17:58 -03:00
Robert Speicher d49768296c Auto-correct `RSpec/DescribedClass` violations 2017-05-01 11:13:33 -04:00
Kim "BKC" Carlbäcker a998710a3b Fix RSpec 2017-04-28 13:07:54 +02:00
Timothy Andrew a7e67604b3 Fix ordering of commits in the network graph.
- We upgraded `rugged` to 0.25.1.1 in !10286 for %9.1

- Prior to this upgrade, the default sort order for commits returned by
  `Gitlab::Git::Repository#find_commits` was `Rugged::SORT_DATE`, which the
  graph relied on.

- While upgrading `rugged`, the MR also changed this default to
  `Rugged::SORT_NONE`, which broke commit ordering in the graph.

- This commit adds an option to `Gitlab::Git::Repository#find_commits` to sort
  by date, and changes the graph builder `Network::Graph` so it explictly
  requests the `:date` sort order
2017-04-27 13:09:54 +00:00
James Lopez 71b6a4ba85 Return empty string on UTF8 conversion with U_STRING_NOT_TERMINATED_WARNING error 2017-04-20 16:10:33 +02:00
Douwe Maan d170133bde Refactor changing files in web UI 2017-04-20 00:37:44 +00:00
Douwe Maan d6f49b85f1 Fix specs 2017-04-17 18:31:23 -05:00
Rémy Coutable c43f7d4713 Merge branch 'gitaly-testing' into 'master'
Setup and run a Gitaly server for testing if GitalyClient is enabled

See merge request !10298
2017-04-12 09:25:09 +00:00
Alejandro Rodríguez d6cc8feb6c Setup and run a Gitaly server for testing if GitalyClient is enabled 2017-04-11 16:00:44 -03:00
Rémy Coutable ae88355bb8 Retrieve Git-specific env in Gitlab::Git::RevList and add a new #new_refs method
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-04-10 16:10:18 +02:00
Rémy Coutable cb20cfa244 Retrieve Git-specific env in Gitlab::Git::Repository#rugged
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-04-10 16:10:18 +02:00
Rémy Coutable 05aa038c42 Add a Gitlab::Git::Env to store Git-specific env thread-safely
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-04-10 16:10:18 +02:00
Alejandro Rodríguez 267cd3e359 Incorporate Gitaly client for refs service 2017-04-04 16:53:44 +02:00
mhasbini ed5d59d4c4 Fix symlink icon in project tree 2017-04-02 14:42:37 +03:00
Sean McGivern 53819c5ac6 Support >1 path in Gitlab::Git::Repository#log
This is analogous to `git log -- foo bar baz`, but not the same as
`Gitlab::Git::Repository#log(path: 'foo bar baz')`, which would run `git
log -- 'foo bar baz'`.
2017-03-30 10:21:19 +01:00
Robert Speicher def164e761 Fix RSpec/DescribeSymbol cop violations 2017-03-24 19:04:03 -04:00
Robert Speicher 5409a3c5b7 Merge branch 'feature/use-gitaly-for-commit-show' into 'master'
Use Gitaly for CommitController#show

See merge request !9629
2017-03-17 17:41:44 +00:00
Mark Fletcher 4597654079 Fix archive prefix bug for refs containing dots 2017-03-16 21:04:58 +05:30