BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
052a7cc9
Commit
052a7cc9
authored
Sep 26, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'patch-2' of
https://github.com/zzet/gitlabhq
into zzet-patch-2
Conflicts: app/controllers/projects/merge_requests_controller.rb
parents
9bb1e15c
fb8a3e31
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+9
-6
No files found.
app/controllers/projects/merge_requests_controller.rb
View file @
052a7cc9
...
...
@@ -157,12 +157,15 @@ class Projects::MergeRequestsController < Projects::ApplicationController
end
def
validates_merge_request
# Show git not found page if target branch doesn't exist
return
invalid_mr
unless
@merge_request
.
target_project
.
repository
.
branch_names
.
include?
(
@merge_request
.
target_branch
)
# Show git not found page if source branch doesn't exist
# and there is no saved commits between source & target branch
return
invalid_mr
if
!
@merge_request
.
source_project
.
repository
.
branch_names
.
include?
(
@merge_request
.
source_branch
)
&&
@merge_request
.
commits
.
blank?
# Show git not found page
# if there is no saved commits between source & target branch
if
@merge_request
.
commits
.
blank?
# and if source target doesn't exist
return
invalid_mr
unless
@merge_request
.
target_project
.
repository
.
branch_names
.
include?
(
@merge_request
.
target_branch
)
# or if source branch doesn't exist
return
invalid_mr
unless
@merge_request
.
source_project
.
repository
.
branch_names
.
include?
(
@merge_request
.
source_branch
)
end
end
def
define_show_vars
...
...
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