Do not query multiple times git for branch (#1435).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2043 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
9882217847
commit
3fdc273252
|
@ -31,8 +31,8 @@ module Redmine
|
|||
if rev != 'latest' && !rev.nil?
|
||||
cmd="#{GIT_BIN} --git-dir #{target('')} show --date=iso --pretty=fuller #{shell_quote rev} -- #{shell_quote path}"
|
||||
else
|
||||
branch = shellout("#{GIT_BIN} --git-dir #{target('')} branch") { |io| io.grep(/\*/)[0].strip.match(/\* (.*)/)[1] }
|
||||
cmd="#{GIT_BIN} --git-dir #{target('')} log --date=iso --pretty=fuller -1 #{branch} -- #{shell_quote path}"
|
||||
@branch ||= shellout("#{GIT_BIN} --git-dir #{target('')} branch") { |io| io.grep(/\*/)[0].strip.match(/\* (.*)/)[1] }
|
||||
cmd="#{GIT_BIN} --git-dir #{target('')} log --date=iso --pretty=fuller -1 #{@branch} -- #{shell_quote path}"
|
||||
end
|
||||
rev=[]
|
||||
i=0
|
||||
|
|
Loading…
Reference in New Issue