From f120e5a89a4bfc71ecd941ca9ad27c948b2d847b Mon Sep 17 00:00:00 2001 From: Riyad Preukschas Date: Mon, 15 Oct 2012 21:23:35 +0200 Subject: [PATCH] Use shorthand as in TreeController#edit --- lib/gitlab/file_editor.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gitlab/file_editor.rb b/lib/gitlab/file_editor.rb index 6415596..dc3f948 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 -- libgit2 0.21.2