diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-06-29 14:04:04 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-06-29 14:04:04 +0000 |
commit | 88162f697087594e714283f43301a0c35d8b44ee (patch) | |
tree | 535fd71b77eddae4202148d42798d73fc2e2eeef | |
parent | 8e6efc5e751011225faf676f8ae9a458070e4dd7 (diff) | |
parent | 774b7ee277bbad5bbd16a23664cbc2ba7f3b6499 (diff) | |
download | gitlab-ce-88162f697087594e714283f43301a0c35d8b44ee.tar.gz |
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
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | app/helpers/submodule_helper.rb | 2 | ||||
-rw-r--r-- | spec/helpers/submodule_helper_spec.rb | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/CHANGELOG b/CHANGELOG index 3971b924277..71ce1e7dfdb 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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) diff --git a/app/helpers/submodule_helper.rb b/app/helpers/submodule_helper.rb index 6def7793dc3..b3f50ceebe4 100644 --- a/app/helpers/submodule_helper.rb +++ b/app/helpers/submodule_helper.rb @@ -63,7 +63,7 @@ module SubmoduleHelper namespace = components.pop.gsub(/^\.\.$/, '') if namespace.empty? - namespace = @project.namespace.name + namespace = @project.namespace.path end [ diff --git a/spec/helpers/submodule_helper_spec.rb b/spec/helpers/submodule_helper_spec.rb index a7abf9d3839..10121759132 100644 --- a/spec/helpers/submodule_helper_spec.rb +++ b/spec/helpers/submodule_helper_spec.rb @@ -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] } |