Skip to content
Snippets Groups Projects
Commit bb5e50e0 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Fix edit files

parent b9265566
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
Loading
Loading
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment