git fixes
This commit is contained in:
parent
d7cedacd11
commit
20af306073
|
@ -43,12 +43,8 @@ class Git::BlobsController < Git::BaseController
|
||||||
end
|
end
|
||||||
|
|
||||||
protected
|
protected
|
||||||
def find_repository
|
|
||||||
# @repository = @project.repositories.find_by_name!(params[:repository_name])
|
|
||||||
end
|
|
||||||
|
|
||||||
def set_path
|
def set_path
|
||||||
@path = params[:path].join("/")
|
@path = params[:path]
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_treeish
|
def set_treeish
|
||||||
|
|
|
@ -5,7 +5,9 @@ class Git::TreesController < Git::BaseController
|
||||||
@path = params[:path]
|
@path = params[:path]
|
||||||
|
|
||||||
@tree = @repository.tree(@treeish)
|
@tree = @repository.tree(@treeish)
|
||||||
@tree = @tree / @path if @path
|
|
||||||
|
# ???
|
||||||
|
# @tree = @tree / @path if @path
|
||||||
|
|
||||||
render :template => "git/repositories/show"
|
render :template => "git/repositories/show"
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
.commit_row
|
.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)
|
.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
|
.row.parents
|
||||||
- commit.parents.each do |parent|
|
- commit.parents.each do |parent|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
- if @commit.committer != @commit.author
|
- if commit.committer != commit.author
|
||||||
.row.author Author: #{@commit.author}, #{commit_date(@commit.authored_date)}
|
.row.author Author: #{commit.author}, #{commit_date(commit.authored_date)}
|
||||||
.row.committer Committer: #{@commit.committer}, #{commit_date(@commit.committed_date)}
|
.row.committer Committer: #{commit.committer}, #{commit_date(commit.committed_date)}
|
||||||
- else
|
- 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}
|
= 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
|
.row.commit_message
|
||||||
%code!= format_commit_message(@commit.message)
|
%code!= format_commit_message(@commit.message)
|
||||||
|
|
|
@ -29,6 +29,6 @@
|
||||||
- if entry.is_a?(Grit::Blob)
|
- if entry.is_a?(Grit::Blob)
|
||||||
= link_to entry.name, blob_path(@platform.name, @project.name, @treeish, File.join([@path, entry.name].compact))
|
= link_to entry.name, blob_path(@platform.name, @project.name, @treeish, File.join([@path, entry.name].compact))
|
||||||
- else
|
- 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==
|
||||||
%td==
|
%td==
|
|
@ -14,7 +14,7 @@ Rosa::Application.routes.draw do
|
||||||
|
|
||||||
# Commits
|
# 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/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
|
# 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
|
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