summaryrefslogtreecommitdiff
path: root/lib/extracts_path.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/extracts_path.rb')
-rw-r--r--lib/extracts_path.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/extracts_path.rb b/lib/extracts_path.rb
index 351fc2f23ae..4ad485c5e52 100644
--- a/lib/extracts_path.rb
+++ b/lib/extracts_path.rb
@@ -100,8 +100,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.
- commits = @project.repository.commits(@ref, @path, 1, 0)
- @commit = CommitDecorator.decorate(commits.first)
+ @commit = @project.repository.commits(@ref, @path, 1, 0).first
+ @commit = CommitDecorator.decorate(@commit)
@tree = Tree.new(@commit.tree, @ref, @path)
@tree = TreeDecorator.new(@tree)