Commit f120e5a89a4bfc71ecd941ca9ad27c948b2d847b
1 parent
3304262c
Exists in
master
and in
4 other branches
Use shorthand as in TreeController#edit
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
lib/gitlab/file_editor.rb
| ... | ... | @@ -51,7 +51,7 @@ module Gitlab |
| 51 | 51 | protected |
| 52 | 52 | |
| 53 | 53 | def can_edit?(path, last_commit) |
| 54 | - current_last_commit = @project.commits(ref, path, 1).first.sha | |
| 54 | + current_last_commit = @project.last_commit_for(ref, path).sha | |
| 55 | 55 | last_commit == current_last_commit |
| 56 | 56 | end |
| 57 | 57 | end | ... | ... |