summaryrefslogtreecommitdiff
path: root/lib/extracts_path.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-03-31 18:50:17 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-03-31 18:50:17 +0300
commit9dc644635f99dffa26555eeb1c92f988221ccb6a (patch)
treeef03c5dbc3a163b30cbbfdf77545bfcc9fb466f8 /lib/extracts_path.rb
parent154e54b46e01615bc13f5e3ac2d0f07f7a27464d (diff)
downloadgitlab-ce-9dc644635f99dffa26555eeb1c92f988221ccb6a.tar.gz
Fix tests and remove app/models/repository.rb
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)