Commit graph

19 commits

Author SHA1 Message Date
Andrew Newdigate
3288e1a874 Adds the Rubocop ReturnNil cop
This style change enforces `return if ...` instead of
`return nil if ...` to save maintainers a few minor review points
2019-03-06 17:51:56 +02:00
gfyoung
e166e5747c Enable some frozen string in lib/gitlab
Enable frozen string for the following files:

* lib/gitlab/auth/**/*.rb
* lib/gitlab/badge/**/*.rb
* lib/gitlab/bare_repository_import/**/*.rb
* lib/gitlab/bitbucket_import/**/*.rb
* lib/gitlab/bitbucket_server_import/**/*.rb
* lib/gitlab/cache/**/*.rb
* lib/gitlab/checks/**/*.rb

Partially addresses #47424.
2018-10-13 02:31:31 -07:00
Alejandro Rodríguez
01de2b5df8 Refactor gitlab:import:repos task to remove direct disk access 2018-07-31 16:28:44 -04:00
Zeger-Jan van de Weg
ec4423665c
Gitlab::Shell works on shard name, not path
Direct disk access is done through Gitaly now, so the legacy path was
deprecated. This path was used in Gitlab::Shell however. This required
the refactoring in this commit.

Added is the removal of direct path access on the project model, as that
lookup wasn't needed anymore is most cases.

Closes https://gitlab.com/gitlab-org/gitaly/issues/1111
2018-04-25 13:36:22 +02:00
Jacob Vosmaer (GitLab)
c43e18fc49 Remove some easy cases of 'path_to_repo' use 2018-03-28 09:21:32 +00:00
Jacob Vosmaer
6d6f7536bd Look for rugged with static analysis 2018-01-25 14:05:11 +01:00
Lin Jen-Shin
4f00a05152 Introduce PredicateMemoization cop and fix offenses
with StrongMemoize
2018-01-12 17:54:55 +08:00
Stan Hu
35d3411f77 Fix hooks not being set up properly for bare import Rake task
Closes #41739
2018-01-09 23:39:19 -08:00
Douglas Barbosa Alexandre
58c2f3b579 Fix Repository#processable? to allow .git repos in the root folder 2018-01-03 16:13:32 -02:00
Douglas Barbosa Alexandre
93eba91df9 Refactoring Project#write_repository_config 2018-01-03 16:13:32 -02:00
Douglas Barbosa Alexandre
582678b5f5 Import directory tree created with hashed storage using import rake task 2018-01-03 16:13:32 -02:00
James Lopez
f2d4b24a94 refactor code to use new import type 2018-01-03 09:10:43 +01:00
James Lopez
11d0083e95 fix missing create services call 2018-01-02 16:48:46 +01:00
James Lopez
54f00b7487 fix wiki check 2018-01-02 10:42:18 +01:00
James Lopez
02276f7a70 Fix import scheduled on bare repo import 2018-01-02 10:42:18 +01:00
Stan Hu
917a112ef0 Simplify normalizing of paths 2017-12-10 23:36:46 -08:00
Stan Hu
e8cced8077 Fix failing importer test case on MySQL due to missing trailing slash in root path 2017-12-08 16:48:24 -08:00
Stan Hu
78f7c3c8a2 Fix gitlab:import:repos Rake task moving repositories into the wrong location
If the source import directory were different from the destination directory,
GitLab would first create a blank repository and then erroneously move the
original one into a subdirectory. Adding an import type prevents this the project
from being initialized in the first place. It was accidentally removed in
1f917cbd49.

Closes #40765
2017-12-08 14:56:43 -08:00
James Lopez
1c8af321dd Improve GitLab Import rake task to work with Hashed Storage and Subgroups 2017-11-07 19:11:42 +00:00