summaryrefslogtreecommitdiff
path: root/app/services/files/update_service.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-02-05 09:07:47 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-02-05 09:07:47 +0000
commitd701d5869516142a4073804622503299202cfbe2 (patch)
tree3d5d50cda5e732bbef2e430c7745a0af65a7fafc /app/services/files/update_service.rb
parent10aa84bd7428fb28fe1dc7923c10f355cbe7fbc7 (diff)
parentfc16a228c915437e17dc040e2798c26acac8fd86 (diff)
downloadgitlab-ce-d701d5869516142a4073804622503299202cfbe2.tar.gz
Merge branch 'gitlab_git_rugged' into 'master'
gitlab_git with rugged Updated gitlab_git version with Blob via rugged
Diffstat (limited to 'app/services/files/update_service.rb')
-rw-r--r--app/services/files/update_service.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/services/files/update_service.rb b/app/services/files/update_service.rb
index d59802ae485..19bd62e1e36 100644
--- a/app/services/files/update_service.rb
+++ b/app/services/files/update_service.rb
@@ -17,7 +17,8 @@ module Files
return error("You can only create files if you are on top of a branch")
end
- blob = repository.blob_at(ref, path)
+ commit = repository.commit(ref)
+ blob = repository.blob_at(commit.sha, path)
unless blob
return error("You can only edit text files")