diff options
Diffstat (limited to 'app/services/files/update_service.rb')
-rw-r--r-- | app/services/files/update_service.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/app/services/files/update_service.rb b/app/services/files/update_service.rb index 19bd62e1e36..c631f28749c 100644 --- a/app/services/files/update_service.rb +++ b/app/services/files/update_service.rb @@ -17,8 +17,7 @@ module Files return error("You can only create files if you are on top of a branch") end - commit = repository.commit(ref) - blob = repository.blob_at(commit.sha, path) + blob = repository.blob_at_branch(ref, path) unless blob return error("You can only edit text files") |