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
0
Merge Requests
0
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
Tatuya Kamada
gitlab-ce
Commits
12fdc13a
Commit
12fdc13a
authored
Dec 04, 2015
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix 500 error when creating a merge request that removes a submodule
parent
e7e22ece
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
48 additions
and
3 deletions
+48
-3
CHANGELOG
CHANGELOG
+1
-0
app/views/projects/diffs/_file.html.haml
app/views/projects/diffs/_file.html.haml
+1
-2
spec/controllers/commit_controller_spec.rb
spec/controllers/commit_controller_spec.rb
+20
-0
spec/controllers/projects/merge_requests_controller_spec.rb
spec/controllers/projects/merge_requests_controller_spec.rb
+24
-0
spec/support/test_env.rb
spec/support/test_env.rb
+2
-1
No files found.
CHANGELOG
View file @
12fdc13a
...
@@ -11,6 +11,7 @@ v 8.3.0 (unreleased)
...
@@ -11,6 +11,7 @@ v 8.3.0 (unreleased)
- Add API endpoint to fetch merge request commits list
- Add API endpoint to fetch merge request commits list
- Expose events API with comment information and author info
- Expose events API with comment information and author info
- Fix: Ensure "Remove Source Branch" button is not shown when branch is being deleted. #3583
- Fix: Ensure "Remove Source Branch" button is not shown when branch is being deleted. #3583
- Fix 500 error when creating a merge request that removes a submodule
v 8.2.2
v 8.2.2
- Fix 404 in redirection after removing a project (Stan Hu)
- Fix 404 in redirection after removing a project (Stan Hu)
...
...
app/views/projects/diffs/_file.html.haml
View file @
12fdc13a
...
@@ -3,9 +3,8 @@
...
@@ -3,9 +3,8 @@
-
if
diff_file
.
diff
.
submodule?
-
if
diff_file
.
diff
.
submodule?
%span
%span
=
icon
(
'archive fw'
)
=
icon
(
'archive fw'
)
-
submodule_item
=
project
.
repository
.
blob_at
(
@commit
.
id
,
diff_file
.
file_path
)
%strong
%strong
=
submodule_link
(
submodule_item
,
@commit
.
id
,
project
.
repository
)
=
submodule_link
(
blob
,
@commit
.
id
,
project
.
repository
)
-
else
-
else
%span
%span
=
blob_icon
blob
.
mode
,
blob
.
name
=
blob_icon
blob
.
mode
,
blob
.
name
...
...
spec/controllers/commit_controller_spec.rb
View file @
12fdc13a
...
@@ -110,6 +110,26 @@ describe Projects::CommitController do
...
@@ -110,6 +110,26 @@ describe Projects::CommitController do
expect
(
response
.
body
).
to
match
(
/^diff --git/
)
expect
(
response
.
body
).
to
match
(
/^diff --git/
)
end
end
end
end
context
'commit that removes a submodule'
do
render_views
let
(
:fork_project
)
{
create
(
:forked_project_with_submodules
)
}
let
(
:commit
)
{
fork_project
.
commit
(
'remove-submodule'
)
}
before
do
fork_project
.
team
<<
[
user
,
:master
]
end
it
'renders it'
do
get
(
:show
,
namespace_id:
fork_project
.
namespace
.
to_param
,
project_id:
fork_project
.
to_param
,
id:
commit
.
id
)
expect
(
response
).
to
be_success
end
end
end
end
describe
"#branches"
do
describe
"#branches"
do
...
...
spec/controllers/projects/merge_requests_controller_spec.rb
View file @
12fdc13a
...
@@ -10,6 +10,30 @@ describe Projects::MergeRequestsController do
...
@@ -10,6 +10,30 @@ describe Projects::MergeRequestsController do
project
.
team
<<
[
user
,
:master
]
project
.
team
<<
[
user
,
:master
]
end
end
describe
'#new'
do
context
'merge request that removes a submodule'
do
render_views
let
(
:fork_project
)
{
create
(
:forked_project_with_submodules
)
}
before
do
fork_project
.
team
<<
[
user
,
:master
]
end
it
'renders it'
do
get
:new
,
namespace_id:
fork_project
.
namespace
.
to_param
,
project_id:
fork_project
.
to_param
,
merge_request:
{
source_branch:
'remove-submodule'
,
target_branch:
'master'
}
expect
(
response
).
to
be_success
end
end
end
describe
"#show"
do
describe
"#show"
do
shared_examples
"export merge as"
do
|
format
|
shared_examples
"export merge as"
do
|
format
|
it
"should generally work"
do
it
"should generally work"
do
...
...
spec/support/test_env.rb
View file @
12fdc13a
...
@@ -21,7 +21,8 @@ module TestEnv
...
@@ -21,7 +21,8 @@ module TestEnv
# We currently only need a subset of the branches
# We currently only need a subset of the branches
FORKED_BRANCH_SHA
=
{
FORKED_BRANCH_SHA
=
{
'add-submodule-version-bump'
=>
'3f547c08'
,
'add-submodule-version-bump'
=>
'3f547c08'
,
'master'
=>
'5937ac0'
'master'
=>
'5937ac0'
,
'remove-submodule'
=>
'2a33e0c0'
}
}
# Test environment
# Test environment
...
...
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