diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-08-11 11:50:43 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-08-11 11:50:43 +0200 |
commit | 34975f0180b209cf3ac7cbe5955f83c10aa4c210 (patch) | |
tree | 4124d12ffb4de991ab36d494ba5c3c11d9d29bea /app/services/files/create_service.rb | |
parent | 24332b7b99e63083a4914f149c43bf8cce5e7a92 (diff) | |
download | gitlab-ce-34975f0180b209cf3ac7cbe5955f83c10aa4c210.tar.gz |
Revert "Create activity event and execute hooks on web editor commit"
This reverts commit 3d416f1682c5e6a6ac1ea7013f66bbd0d23b452c.
Diffstat (limited to 'app/services/files/create_service.rb')
-rw-r--r-- | app/services/files/create_service.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/services/files/create_service.rb b/app/services/files/create_service.rb index bafc3565da1..3516cf30dbc 100644 --- a/app/services/files/create_service.rb +++ b/app/services/files/create_service.rb @@ -40,7 +40,7 @@ module Files params[:content] end - sha = repository.commit_file( + created_successfully = repository.commit_file( current_user, file_path, content, @@ -49,8 +49,7 @@ module Files ) - if sha - after_commit(sha) + if created_successfully success else error("Your changes could not be committed, because the file has been changed") |