Commit bb5e50e0f78ec0dc68d637a43b6ea9889ef1a10d
1 parent
b9265566
Exists in
master
and in
4 other branches
Fix edit files
Showing
2 changed files
with
2 additions
and
2 deletions
Show diff stats
app/controllers/projects/edit_tree_controller.rb
| ... | ... | @@ -10,7 +10,7 @@ class Projects::EditTreeController < Projects::ApplicationController |
| 10 | 10 | before_filter :edit_requirements, only: [:show, :update] |
| 11 | 11 | |
| 12 | 12 | def show |
| 13 | - @last_commit = @project.repository.last_commit_for(@ref, @path).sha | |
| 13 | + @last_commit = Gitlab::Git::Commit.last_for_path(@project.repository, @ref, @path).sha | |
| 14 | 14 | end |
| 15 | 15 | |
| 16 | 16 | def update | ... | ... |
lib/gitlab/satellite/edit_file_action.rb
| ... | ... | @@ -49,7 +49,7 @@ module Gitlab |
| 49 | 49 | protected |
| 50 | 50 | |
| 51 | 51 | def can_edit?(last_commit) |
| 52 | - current_last_commit = @project.repository.last_commit_for(ref, file_path).sha | |
| 52 | + current_last_commit = Gitlab::Git::Commit.last_for_path(@project.repository, ref, file_path).sha | |
| 53 | 53 | last_commit == current_last_commit |
| 54 | 54 | end |
| 55 | 55 | end | ... | ... |