diff options
author | Johan Sørensen <johan@johansorensen.com> | 2009-02-11 11:16:14 +0100 |
---|---|---|
committer | Johan Sørensen <johan@johansorensen.com> | 2009-04-22 14:05:14 +0200 |
commit | 5716e10401cbb240f9aeb92950133b0f032c789c (patch) | |
tree | a2798b6ade7a6d8c4865ca1e2e8c5952500a1f7e /app/controllers/trees_controller.rb | |
parent | 4c3ce68524e106fb0930677376ca9340bcd2e180 (diff) | |
download | gitorious-mainline-outdated-5716e10401cbb240f9aeb92950133b0f032c789c.zip gitorious-mainline-outdated-5716e10401cbb240f9aeb92950133b0f032c789c.tar.gz gitorious-mainline-outdated-5716e10401cbb240f9aeb92950133b0f032c789c.tar.bz2 |
Fix browsing trees at a specific commit sha
Diffstat (limited to 'app/controllers/trees_controller.rb')
-rw-r--r-- | app/controllers/trees_controller.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/trees_controller.rb b/app/controllers/trees_controller.rb index 192280b..66f35a0 100644 --- a/app/controllers/trees_controller.rb +++ b/app/controllers/trees_controller.rb @@ -32,7 +32,8 @@ class TreesController < ApplicationController redirect_to project_repository_tree_path(@project, @repository, branch_with_tree("HEAD", @path)) and return end - @root = Breadcrumb::Folder.new({:paths => @path, :head => @git.get_head(@ref), + head = @git.get_head(@ref) || Grit::Head.new(@commit.id_abbrev, @commit) + @root = Breadcrumb::Folder.new({:paths => @path, :head => head, :repository => @repository}) path = @path.blank? ? [] : ["#{@path.join("/")}/"] # FIXME: meh, this sux @tree = @git.tree(@commit.tree.id, path) |