Commit bb5e50e0f78ec0dc68d637a43b6ea9889ef1a10d

Authored by Dmitriy Zaporozhets
1 parent b9265566

Fix edit files

app/controllers/projects/edit_tree_controller.rb
@@ -10,7 +10,7 @@ class Projects::EditTreeController < Projects::ApplicationController @@ -10,7 +10,7 @@ class Projects::EditTreeController < Projects::ApplicationController
10 before_filter :edit_requirements, only: [:show, :update] 10 before_filter :edit_requirements, only: [:show, :update]
11 11
12 def show 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 end 14 end
15 15
16 def update 16 def update
lib/gitlab/satellite/edit_file_action.rb
@@ -49,7 +49,7 @@ module Gitlab @@ -49,7 +49,7 @@ module Gitlab
49 protected 49 protected
50 50
51 def can_edit?(last_commit) 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 last_commit == current_last_commit 53 last_commit == current_last_commit
54 end 54 end
55 end 55 end