#173: redirect to #tree_path when blob is tree
This commit is contained in:
parent
d01e8fa954
commit
9f80f662a5
|
@ -33,6 +33,7 @@ class Projects::Git::BlobsController < Projects::Git::BaseController
|
|||
|
||||
def set_blob
|
||||
@blob = @tree / @path or raise Grit::NoSuchPathError
|
||||
redirect_to tree_path(@project, :treeish => @treeish, :path => @path) if @blob.is_a? Grit::Tree
|
||||
@commit = @project.repo.log(@treeish, @path, :max_count => 1).first
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue