git fixes
This commit is contained in:
parent
d7cedacd11
commit
20af306073
|
@ -43,12 +43,8 @@ class Git::BlobsController < Git::BaseController
|
|||
end
|
||||
|
||||
protected
|
||||
def find_repository
|
||||
# @repository = @project.repositories.find_by_name!(params[:repository_name])
|
||||
end
|
||||
|
||||
def set_path
|
||||
@path = params[:path].join("/")
|
||||
@path = params[:path]
|
||||
end
|
||||
|
||||
def set_treeish
|
||||
|
|
|
@ -5,7 +5,9 @@ class Git::TreesController < Git::BaseController
|
|||
@path = params[:path]
|
||||
|
||||
@tree = @repository.tree(@treeish)
|
||||
@tree = @tree / @path if @path
|
||||
|
||||
# ???
|
||||
# @tree = @tree / @path if @path
|
||||
|
||||
render :template => "git/repositories/show"
|
||||
end
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.commit_row
|
||||
= render :partial => "commit_pane", :locals => { :commit => commit }
|
||||
= render :partial => "git/commits/commit_pane", :locals => { :commit => commit }
|
||||
|
||||
.row= link_to commit.message, commit_path(@platform.name, @project.name, commit.id)
|
|
@ -1,6 +1,6 @@
|
|||
= render :partial => "committer_pane", :locals => { :commit => commit }
|
||||
= render :partial => "git/commits/committer_pane", :locals => { :commit => commit }
|
||||
|
||||
.row.tree Tree: #{link_to @commit.tree.id, tree_path(@platform.name, @project.name, commit.tree.id)}
|
||||
.row.tree Tree: #{link_to commit.tree.id, tree_path(@platform.name, @project.name, commit.tree.id)}
|
||||
|
||||
.row.parents
|
||||
- commit.parents.each do |parent|
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
- if @commit.committer != @commit.author
|
||||
.row.author Author: #{@commit.author}, #{commit_date(@commit.authored_date)}
|
||||
.row.committer Committer: #{@commit.committer}, #{commit_date(@commit.committed_date)}
|
||||
- if commit.committer != commit.author
|
||||
.row.author Author: #{commit.author}, #{commit_date(commit.authored_date)}
|
||||
.row.committer Committer: #{commit.committer}, #{commit_date(commit.committed_date)}
|
||||
- else
|
||||
.row.author #{@commit.author}, #{commit_date(@commit.committed_date)}
|
||||
.row.author #{commit.author}, #{commit_date(commit.committed_date)}
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
= render :partial => "commit_pane", :locals => { :commit => @commit}
|
||||
|
||||
#{link_to "raw diff", commit_path(@project.title, @repository.name, @commit.id, :diff)} | #{link_to "patch", commit_path(@project.title, @repository.name, @commit.id, :patch)}
|
||||
#{link_to "raw diff", commit_path(@platform.name, @project.name, @commit.id, :diff)} | #{link_to "patch", commit_path(@platform.name, @project.name, @commit.id, :patch)}
|
||||
|
||||
.row.commit_message
|
||||
%code!= format_commit_message(@commit.message)
|
||||
|
|
|
@ -29,6 +29,6 @@
|
|||
- if entry.is_a?(Grit::Blob)
|
||||
= link_to entry.name, blob_path(@platform.name, @project.name, @treeish, File.join([@path, entry.name].compact))
|
||||
- else
|
||||
= link_to "#{entry.name}/", tree_path(@platform.name, @project.name, @repository.name, @treeish, File.join([@path, entry.name].compact))
|
||||
= link_to "#{entry.name}/", tree_path(@platform.name, @project.name, @treeish, File.join([@path, entry.name].compact))
|
||||
%td==
|
||||
%td==
|
|
@ -14,7 +14,7 @@ Rosa::Application.routes.draw do
|
|||
|
||||
# Commits
|
||||
match 'platforms/:platform_name//projects/:project_name/git/commits/:treeish(/*path)', :controller => "git/commits", :action => :index, :treeish => /[0-9a-zA-Z_.\-]*/, :defaults => { :treeish => :master }, :as => :commits
|
||||
match 'platforms/:platform_name//projects/:project_name/git/commit/:id(.:format)', :controller => "git/comnits", :action => :show, :defaults => { :format => :html }, :as => :commit
|
||||
match 'platforms/:platform_name//projects/:project_name/git/commit/:id(.:format)', :controller => "git/commits", :action => :show, :defaults => { :format => :html }, :as => :commit
|
||||
|
||||
# Blobs
|
||||
match 'platforms/:platform_name/projects/:project_name/git/blob/:treeish/*path', :controller => "git/blobs", :action => :show, :treeish => /[0-9a-zA-Z_.\-]*/, :defaults => { :treeish => :master }, :as => :blob
|
||||
|
|
Loading…
Reference in New Issue