Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRiyad Preukschas <riyad@informatik.uni-bremen.de>2012-10-15 23:23:35 +0400
committerRiyad Preukschas <riyad@informatik.uni-bremen.de>2012-10-16 01:40:23 +0400
commitf120e5a89a4bfc71ecd941ca9ad27c948b2d847b (patch)
tree08beddaaec5d09219c906bb73d34de4c27578720 /lib
parent3304262c3da429a5970e08b4cd0e58738b10c8eb (diff)
Use shorthand as in TreeController#edit
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/file_editor.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/file_editor.rb b/lib/gitlab/file_editor.rb
index 64155967ef4..dc3f9480460 100644
--- a/lib/gitlab/file_editor.rb
+++ b/lib/gitlab/file_editor.rb
@@ -51,7 +51,7 @@ module Gitlab
protected
def can_edit?(path, last_commit)
- current_last_commit = @project.commits(ref, path, 1).first.sha
+ current_last_commit = @project.last_commit_for(ref, path).sha
last_commit == current_last_commit
end
end