diff options
Diffstat (limited to 'app/services/files/create_service.rb')
-rw-r--r-- | app/services/files/create_service.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/services/files/create_service.rb b/app/services/files/create_service.rb index 3516cf30dbc..bafc3565da1 100644 --- a/app/services/files/create_service.rb +++ b/app/services/files/create_service.rb @@ -40,7 +40,7 @@ module Files params[:content] end - created_successfully = repository.commit_file( + sha = repository.commit_file( current_user, file_path, content, @@ -49,7 +49,8 @@ module Files ) - if created_successfully + if sha + after_commit(sha) success else error("Your changes could not be committed, because the file has been changed") |