Commit graph

11 commits

Author SHA1 Message Date
Bob Van Landuyt
2fdda74458 Fall back to project repository type by default
This makes sure that we always have a repository type when trying to
parse a repository from a path.

This is needed because sometimes we want to perform access checks as
if the project already existed, for example when creating a project on
push.

Before this we were only doing that when accessing git over http, this
makes sure it also works correctly when accessing git over SSH
2019-04-05 10:51:42 +00:00
Bob Van Landuyt
d36415b754 Allow multiple repositories per project
This changes the repository type from a binary `wiki?` to a type. So
we can have more than 2 repository types.

Now everywhere we called `.wiki?` and expected a boolean, we check
that type.
2019-03-26 13:21:03 +01:00
Zeger-Jan van de Weg
cc7931cc9c
Remove Gitlab::RepoPath.strip_storage_path
This used to be executed because of the post receive worker, but this
uses Gitlab::GlRepository.parse now. So this removes dead code and
reduces the number of calls on `#legacy_storage_path`.
2018-05-11 13:57:43 +02:00
Jacob Vosmaer
008a6a6ce6 Route path lookups through legacy_disk_path 2018-03-21 18:18:32 +01:00
Nick Thomas
6b0c6e69e1
Use hashed storage in the specs 2018-02-07 13:40:46 +00:00
Robert Speicher
72a7b30c9f Change all :empty_project to :project 2017-08-02 17:47:31 -04:00
Robert Speicher
9513bd18c4 Ensure all project factories use :repository trait or :empty_project 2017-08-01 14:51:52 -04:00
Michael Kozono
af784cc6e2 Add “Project moved” error to Git-over-SSH 2017-06-16 14:14:19 -07: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
Alejandro Rodríguez
c45341c816 Generate and handle a gl_repository param to pass around components
This new param allows us to share project information between components
that don't share or don't have access to the same filesystem
mountpoints, for example between Gitaly and Rails or between Rails and
Gitlab-Shell hooks. The previous parameters are still supported, but if
found, gl_repository is prefered. The old parameters should be deprecated
once all components support the new format.
2017-05-03 17:37:30 -03:00
Jacob Vosmaer
c837da3439 Helper method for storage path stripping 2017-03-29 14:48:04 +02:00