Merge branch 'dev_hjq' of http://repository.trustie.net/xianbo/trustie2 into dev_hjq
Conflicts: app/controllers/repositories_controller.rb
This commit is contained in:
commit
a8eb62b24e
|
@ -38,8 +38,8 @@ class Repository::Git < Repository
|
||||||
'Git'
|
'Git'
|
||||||
end
|
end
|
||||||
|
|
||||||
def commits(authors, start_date, end_date)
|
def commits(authors, start_date, end_date, branch='master')
|
||||||
scm.commits(authors, start_date, end_date).map {|commit|
|
scm.commits(authors, start_date, end_date,branch).map {|commit|
|
||||||
[commit[:author], commit[:num]]
|
[commit[:author], commit[:num]]
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
|
@ -396,10 +396,10 @@ module Redmine
|
||||||
sum[:insertion] + sum[:deletion]
|
sum[:insertion] + sum[:deletion]
|
||||||
end
|
end
|
||||||
|
|
||||||
def commits(authors, start_date, end_date)
|
def commits(authors, start_date, end_date, branch='master')
|
||||||
rs = []
|
rs = []
|
||||||
authors.each do |author|
|
authors.each do |author|
|
||||||
cmd_args = %W|log --pretty=tformat: --shortstat --author=#{author} --since=#{start_date} --until=#{end_date}|
|
cmd_args = %W|log #{branch} --pretty=tformat: --shortstat --author=#{author} --since=#{start_date} --until=#{end_date}|
|
||||||
commits = ''
|
commits = ''
|
||||||
git_cmd(cmd_args) do |io|
|
git_cmd(cmd_args) do |io|
|
||||||
commits = io.read
|
commits = io.read
|
||||||
|
|
Loading…
Reference in New Issue