Skip to content
  • Markus Koller's avatar
    Generalize repository routing · abe3a8cf
    Markus Koller authored
    Previously we used both a `:namespace_id` and a `:repository_id` in the
    repository routes, which originally made sense for project repositories,
    but was confusing with personal snippets where `:namespace_id` was just
    the `/snippets` prefix and not an actual namespace.
    
    For group wiki repositories we also need to support toplevel groups,
    where we only have a namespace path.
    
    So we combine `:namespace_id` and `:repository_id` into a single
    `:repository_path` route argument, and refactor the related controllers
    and internal APIs accordingly.
    
    The repository path is mainly used in `Gitlab::RepoPath` to determine
    the container for the repository. In the `GitAccess` classes it's only
    used in `GitAccessProject` when auto-creating project repositories,
    where we need to know in which namespace to create the new project.
    abe3a8cf