Fix edit files

This commit is contained in:
Dmitriy Zaporozhets 2013-08-05 16:55:15 +03:00
parent b92655663c
commit bb5e50e0f7
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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