Fix edit files
This commit is contained in:
parent
b92655663c
commit
bb5e50e0f7
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue