mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-20 15:31:12 +00:00
Git 2.9 compatibility (#25371)
git-svn-id: http://svn.redmine.org/redmine/trunk@16422 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
064067fbf2
commit
47dff44278
@ -166,6 +166,7 @@ module Redmine
|
|||||||
def lastrev(path, rev)
|
def lastrev(path, rev)
|
||||||
return nil if path.nil?
|
return nil if path.nil?
|
||||||
cmd_args = %w|log --no-color --encoding=UTF-8 --date=iso --pretty=fuller --no-merges -n 1|
|
cmd_args = %w|log --no-color --encoding=UTF-8 --date=iso --pretty=fuller --no-merges -n 1|
|
||||||
|
cmd_args << '--no-renames' if self.class.client_version_above?([2, 9])
|
||||||
cmd_args << rev if rev
|
cmd_args << rev if rev
|
||||||
cmd_args << "--" << path unless path.empty?
|
cmd_args << "--" << path unless path.empty?
|
||||||
lines = []
|
lines = []
|
||||||
@ -194,6 +195,7 @@ module Redmine
|
|||||||
def revisions(path, identifier_from, identifier_to, options={})
|
def revisions(path, identifier_from, identifier_to, options={})
|
||||||
revs = Revisions.new
|
revs = Revisions.new
|
||||||
cmd_args = %w|log --no-color --encoding=UTF-8 --raw --date=iso --pretty=fuller --parents --stdin|
|
cmd_args = %w|log --no-color --encoding=UTF-8 --raw --date=iso --pretty=fuller --parents --stdin|
|
||||||
|
cmd_args << '--no-renames' if self.class.client_version_above?([2, 9])
|
||||||
cmd_args << "--reverse" if options[:reverse]
|
cmd_args << "--reverse" if options[:reverse]
|
||||||
cmd_args << "-n" << "#{options[:limit].to_i}" if options[:limit]
|
cmd_args << "-n" << "#{options[:limit].to_i}" if options[:limit]
|
||||||
cmd_args << "--" << scm_iconv(@path_encoding, 'UTF-8', path) if path && !path.empty?
|
cmd_args << "--" << scm_iconv(@path_encoding, 'UTF-8', path) if path && !path.empty?
|
||||||
@ -312,6 +314,7 @@ module Redmine
|
|||||||
cmd_args = []
|
cmd_args = []
|
||||||
if identifier_to
|
if identifier_to
|
||||||
cmd_args << "diff" << "--no-color" << identifier_to << identifier_from
|
cmd_args << "diff" << "--no-color" << identifier_to << identifier_from
|
||||||
|
cmd_args << '--no-renames' if self.class.client_version_above?([2, 9])
|
||||||
else
|
else
|
||||||
cmd_args << "show" << "--no-color" << identifier_from
|
cmd_args << "show" << "--no-color" << identifier_from
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user