summaryrefslogtreecommitdiff
path: root/lib/extracts_path.rb
diff options
context:
space:
mode:
authorSebastian Ziebell <sebastian.ziebell@asquera.de>2013-02-13 10:31:06 +0100
committerSebastian Ziebell <sebastian.ziebell@asquera.de>2013-02-13 10:31:06 +0100
commit375caeefcfb2672c8fdce18cf6f35372729d0c43 (patch)
tree74b90868c88f9641a0975271f8a5620709f90eb9 /lib/extracts_path.rb
parentae40e855efc393d752f290ed8eda67961874acf5 (diff)
parentb9f8b4019073fe60515bda8947d9040b4b73ea38 (diff)
downloadgitlab-ce-375caeefcfb2672c8fdce18cf6f35372729d0c43.tar.gz
Merge branch 'master' into fixes/api
Diffstat (limited to 'lib/extracts_path.rb')
-rw-r--r--lib/extracts_path.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/extracts_path.rb b/lib/extracts_path.rb
index 976ac018204..fb595e18b24 100644
--- a/lib/extracts_path.rb
+++ b/lib/extracts_path.rb
@@ -117,7 +117,10 @@ module ExtractsPath
@id = File.join(@ref, @path)
- @commit = CommitDecorator.decorate(@project.repository.commit(@ref))
+ # 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)
@tree = Tree.new(@commit.tree, @ref, @path)
@tree = TreeDecorator.new(@tree)