diff options
author | Valery Sizov <valery@gitlab.com> | 2016-07-06 16:26:59 +0300 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2016-07-06 17:44:27 +0300 |
commit | c14acda909a6b463a29069568be803c78a2f9b46 (patch) | |
tree | b985bac8f28fabfa52d61e0e3c7535bf9c917fe5 /app/services/files/base_service.rb | |
parent | cfd5870b62e9d76e564ffc64db1d1281b4a363bb (diff) | |
download | gitlab-ce-services_refactoring.tar.gz |
Services: code style fixes, minor refactoringservices_refactoring
Diffstat (limited to 'app/services/files/base_service.rb')
-rw-r--r-- | app/services/files/base_service.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index 4bdb68a3698..37c5e321b39 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -15,7 +15,6 @@ module Files params[:file_content] end - # Validate parameters validate # Create new branch if it different from source_branch @@ -26,7 +25,7 @@ module Files if commit success else - error("Something went wrong. Your changes were not committed") + error('Something went wrong. Your changes were not committed') end rescue Repository::CommitError, Gitlab::Git::Repository::InvalidBlobName, GitHooksService::PreReceiveError, ValidationError => ex error(ex.message) @@ -51,12 +50,12 @@ module Files unless project.empty_repo? unless @source_project.repository.branch_names.include?(@source_branch) - raise_error("You can only create or edit files when you are on a branch") + raise_error('You can only create or edit files when you are on a branch') end if different_branch? if repository.branch_names.include?(@target_branch) - raise_error("Branch with such name already exists. You need to switch to this branch in order to make changes") + raise_error('Branch with such name already exists. You need to switch to this branch in order to make changes') end end end |