##// END OF EJS Templates
Fixed wrong commit range in git log command. #5628...
Jean-Baptiste Barth -
r3811:780bdccc4246
parent child
Show More
@@ -114,12 +114,12 module Redmine
114 114 def revisions(path, identifier_from, identifier_to, options={})
115 115 revisions = Revisions.new
116 116
117 cmd = "#{GIT_BIN} --git-dir #{target('')} log --raw --date=iso --pretty=fuller"
118 cmd << " --reverse" if options[:reverse]
119 cmd << " --all" if options[:all]
117 cmd = "#{GIT_BIN} --git-dir #{target('')} log --raw --date=iso --pretty=fuller "
118 cmd << " --reverse " if options[:reverse]
119 cmd << " --all " if options[:all]
120 120 cmd << " -n #{options[:limit]} " if options[:limit]
121 cmd << " #{shell_quote(identifier_from + '..')} " if identifier_from
122 cmd << " #{shell_quote identifier_to} " if identifier_to
121 cmd << "#{shell_quote(identifier_from + '..')}" if identifier_from
122 cmd << "#{shell_quote identifier_to}" if identifier_to
123 123 cmd << " --since=#{shell_quote(options[:since].strftime("%Y-%m-%d %H:%M:%S"))}" if options[:since]
124 124 cmd << " -- #{path}" if path && !path.empty?
125 125
@@ -16,6 +16,10 class GitAdapterTest < ActiveSupport::TestCase
16 16 assert_equal 13, @adapter.revisions('',nil,nil,:all => true).length
17 17 end
18 18
19 def test_getting_certain_revisions
20 assert_equal 1, @adapter.revisions('','899a15d^','899a15d').length
21 end
22
19 23 def test_annotate
20 24 annotate = @adapter.annotate('sources/watchers_controller.rb')
21 25 assert_kind_of Redmine::Scm::Adapters::Annotate, annotate
General Comments 0
You need to be logged in to leave comments. Login now