Skip to content
Snippets Groups Projects
Commit 88162f69 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Merge branch 'fix-relative-submodule-namespace-path' into 'master'

Fix Error 500 when relative submodule resolves to a namespace that has a different name from its path

### What does this MR do?

This MR fixes a bug in resolving a namespace when the `name` differed from `path`.

### Why was this MR needed?

The original code was using `name`, when the proper input to `namespace_project_path` was `path`.

### What are the relevant issue numbers?

Closes #1849

See merge request !864
parents 8e6efc5e 774b7ee2
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -7,6 +7,7 @@ v 7.13.0 (unreleased)
- Fix error when deleting a user who has projects (Stan Hu)
- Fix downloading of patches on public merge requests when user logged out (Stan Hu)
- The password for the default administrator (root) account has been changed from "5iveL!fe" to "password".
- Fix Error 500 when relative submodule resolves to a namespace that has a different name from its path (Stan Hu)
- Update maintenance documentation to explain no need to recompile asssets for omnibus installations (Stan Hu)
- Support commenting on diffs in side-by-side mode (Stan Hu)
- Fix JavaScript error when clicking on the comment button on a diff line that has a comment already (Stan Hu)
Loading
Loading
Loading
Loading
@@ -63,7 +63,7 @@ module SubmoduleHelper
namespace = components.pop.gsub(/^\.\.$/, '')
 
if namespace.empty?
namespace = @project.namespace.name
namespace = @project.namespace.path
end
 
[
Loading
Loading
Loading
Loading
@@ -115,7 +115,7 @@ describe SubmoduleHelper do
end
 
context 'submodules with relative links' do
let(:group) { create(:group) }
let(:group) { create(:group, name: "Master Project", path: "master-project") }
let(:project) { create(:project, group: group) }
let(:commit_id) { sample_commit[:id] }
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment