Commit bb5e50e0 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix edit files

parent b9265566
......@@ -10,7 +10,7 @@ class Projects::EditTreeController < Projects::ApplicationController
before_filter :edit_requirements, only: [:show, :update]
def show
@last_commit = @project.repository.last_commit_for(@ref, @path).sha
@last_commit = Gitlab::Git::Commit.last_for_path(@project.repository, @ref, @path).sha
end
def update
......
......@@ -49,7 +49,7 @@ module Gitlab
protected
def can_edit?(last_commit)
current_last_commit = @project.repository.last_commit_for(ref, file_path).sha
current_last_commit = Gitlab::Git::Commit.last_for_path(@project.repository, ref, file_path).sha
last_commit == current_last_commit
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment