scm: git: add includes and excludes options to lib revisions method (#8857)

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8815 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA
2012-02-08 23:38:35 +00:00
parent adb81b1ff6
commit 34b3a9851f
2 changed files with 67 additions and 3 deletions
+11 -3
View File
@@ -193,9 +193,17 @@ module Redmine
cmd_args << "--reverse" if options[:reverse]
cmd_args << "-n" << "#{options[:limit].to_i}" if options[:limit]
from_to = ""
from_to << "#{identifier_from}.." if identifier_from
from_to << "#{identifier_to}" if identifier_to
cmd_args << from_to if !from_to.empty?
if identifier_from || identifier_to
from_to << "#{identifier_from}.." if identifier_from
from_to << "#{identifier_to}" if identifier_to
cmd_args << from_to if !from_to.empty?
else
cmd_args += options[:includes] unless options[:includes].blank?
unless options[:excludes].blank?
cmd_args << "--not"
cmd_args += options[:excludes]
end
end
cmd_args << "--" << scm_iconv(@path_encoding, 'UTF-8', path) if path && !path.empty?
scm_cmd *cmd_args do |io|