diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-12-14 03:03:20 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-12-14 03:40:01 +0800 |
commit | 56d131dcd52cba98e0eee253cab8bbf0b3b706df (patch) | |
tree | 4af1c5cbfedde379ca47f58ecceccfdeb16bced8 /app | |
parent | 944a8fa4d204ce7e9967f372a61657e75b4e88a0 (diff) | |
download | gitlab-ce-56d131dcd52cba98e0eee253cab8bbf0b3b706df.tar.gz |
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
Diffstat (limited to 'app')
-rw-r--r-- | app/services/git_operation_service.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/services/git_operation_service.rb b/app/services/git_operation_service.rb index b00fbcf9a79..0d1bd05e552 100644 --- a/app/services/git_operation_service.rb +++ b/app/services/git_operation_service.rb @@ -151,17 +151,17 @@ class GitOperationService end unless source_project.repository.branch_exists?(source_branch_name) - raise Repository::CommitError.new( + raise ArgumentError, "Cannot find branch #{branch_name} nor" \ " #{source_branch_name} from" \ - " #{source_project.path_with_namespace}") + " #{source_project.path_with_namespace}" end elsif source_branch_name unless repository.branch_exists?(source_branch_name) - raise Repository::CommitError.new( + raise ArgumentError, "Cannot find branch #{branch_name} nor" \ " #{source_branch_name} from" \ - " #{repository.project.path_with_namespace}") + " #{repository.project.path_with_namespace}" end end end |