Use ArgumentError error instead because it's a bug
if it happens. Feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7237#note_19747933
This commit is contained in:
parent
944a8fa4d2
commit
56d131dcd5
1 changed files with 4 additions and 4 deletions
|
@ -151,17 +151,17 @@ class GitOperationService
|
||||||
end
|
end
|
||||||
|
|
||||||
unless source_project.repository.branch_exists?(source_branch_name)
|
unless source_project.repository.branch_exists?(source_branch_name)
|
||||||
raise Repository::CommitError.new(
|
raise ArgumentError,
|
||||||
"Cannot find branch #{branch_name} nor" \
|
"Cannot find branch #{branch_name} nor" \
|
||||||
" #{source_branch_name} from" \
|
" #{source_branch_name} from" \
|
||||||
" #{source_project.path_with_namespace}")
|
" #{source_project.path_with_namespace}"
|
||||||
end
|
end
|
||||||
elsif source_branch_name
|
elsif source_branch_name
|
||||||
unless repository.branch_exists?(source_branch_name)
|
unless repository.branch_exists?(source_branch_name)
|
||||||
raise Repository::CommitError.new(
|
raise ArgumentError,
|
||||||
"Cannot find branch #{branch_name} nor" \
|
"Cannot find branch #{branch_name} nor" \
|
||||||
" #{source_branch_name} from" \
|
" #{source_branch_name} from" \
|
||||||
" #{repository.project.path_with_namespace}")
|
" #{repository.project.path_with_namespace}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue