diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2017-03-20 18:05:10 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2017-03-20 18:05:10 +0000 |
commit | e87c3a09bd71e6507093ff0bb1f14b67f960b588 (patch) | |
tree | da714b652c0a2e1bc9e3c7c433722e50da6c769d | |
parent | b8ab16b448ec7781c9a66ce19fa154820bbe2e67 (diff) | |
download | redmine-e87c3a09bd71e6507093ff0bb1f14b67f960b588.tar.gz redmine-e87c3a09bd71e6507093ff0bb1f14b67f960b588.zip |
Merged r16422 from trunk to 3.2-stable (#25371)
Git 2.9 compatibility.
git-svn-id: http://svn.redmine.org/redmine/branches/3.2-stable@16425 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | lib/redmine/scm/adapters/git_adapter.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/redmine/scm/adapters/git_adapter.rb b/lib/redmine/scm/adapters/git_adapter.rb index 52ecf691f..574fc30a0 100644 --- a/lib/redmine/scm/adapters/git_adapter.rb +++ b/lib/redmine/scm/adapters/git_adapter.rb @@ -166,6 +166,7 @@ module Redmine def lastrev(path, rev) return nil if path.nil? 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 << "--" << path unless path.empty? lines = [] @@ -194,6 +195,7 @@ module Redmine def revisions(path, identifier_from, identifier_to, options={}) revs = Revisions.new 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 << "-n" << "#{options[:limit].to_i}" if options[:limit] cmd_args << "--" << scm_iconv(@path_encoding, 'UTF-8', path) if path && !path.empty? @@ -312,6 +314,7 @@ module Redmine cmd_args = [] if identifier_to cmd_args << "diff" << "--no-color" << identifier_to << identifier_from + cmd_args << '--no-renames' if self.class.client_version_above?([2, 9]) else cmd_args << "show" << "--no-color" << identifier_from end |