Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
e292cc74
Commit
e292cc74
authored
Jul 22, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
e91fa775
8b284a51
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
58 additions
and
40 deletions
+58
-40
app/helpers/submodule_helper.rb
app/helpers/submodule_helper.rb
+8
-4
changelogs/unreleased/dm-submodule-helper-routing.yml
changelogs/unreleased/dm-submodule-helper-routing.yml
+5
-0
spec/helpers/submodule_helper_spec.rb
spec/helpers/submodule_helper_spec.rb
+45
-36
No files found.
app/helpers/submodule_helper.rb
View file @
e292cc74
...
...
@@ -34,8 +34,8 @@ module SubmoduleHelper
project
.
sub!
(
/\.git\z/
,
''
)
if
self_url?
(
url
,
namespace
,
project
)
[
namespace_project_path
(
namespace
,
project
),
namespace_project_tree_path
(
namespace
,
project
,
submodule_item_id
)]
[
url_helpers
.
namespace_project_path
(
namespace
,
project
),
url_helpers
.
namespace_project_tree_path
(
namespace
,
project
,
submodule_item_id
)]
elsif
relative_self_url?
(
url
)
relative_self_links
(
url
,
submodule_item_id
,
repository
.
project
)
elsif
github_dot_com_url?
(
url
)
...
...
@@ -99,8 +99,8 @@ module SubmoduleHelper
begin
[
namespace_project_path
(
target_namespace_path
,
submodule_base
),
namespace_project_tree_path
(
target_namespace_path
,
submodule_base
,
commit
)
url_helpers
.
namespace_project_path
(
target_namespace_path
,
submodule_base
),
url_helpers
.
namespace_project_tree_path
(
target_namespace_path
,
submodule_base
,
commit
)
]
rescue
ActionController
::
UrlGenerationError
[
nil
,
nil
]
...
...
@@ -118,4 +118,8 @@ module SubmoduleHelper
rescue
URI
::
InvalidURIError
nil
end
def
url_helpers
Gitlab
::
Routing
.
url_helpers
end
end
changelogs/unreleased/dm-submodule-helper-routing.yml
0 → 100644
View file @
e292cc74
---
title
:
Fix bug that caused diffs not to show on MRs with changes to submodules
merge_request
:
author
:
type
:
fixed
spec/helpers/submodule_helper_spec.rb
View file @
e292cc74
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment