Extend models functionality with old decorator methods. Use Repository model
This commit is contained in:
parent
b53557aca6
commit
bbfbff3add
7 changed files with 67 additions and 11 deletions
|
@ -101,10 +101,8 @@ module ExtractsPath
|
|||
# It is used "@project.repository.commits(@ref, @path, 1, 0)",
|
||||
# because "@project.repository.commit(@ref)" returns wrong commit when @ref is tag name.
|
||||
@commit = @project.repository.commits(@ref, @path, 1, 0).first
|
||||
@commit = CommitDecorator.decorate(@commit)
|
||||
|
||||
@tree = Tree.new(@commit.tree, @ref, @path)
|
||||
@tree = TreeDecorator.new(@tree)
|
||||
|
||||
raise InvalidPathError if @tree.invalid?
|
||||
rescue RuntimeError, NoMethodError, InvalidPathError
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue