diff --git a/lib/redmine/scm/adapters/git_adapter.rb b/lib/redmine/scm/adapters/git_adapter.rb index 753e6c889..192df0229 100644 --- a/lib/redmine/scm/adapters/git_adapter.rb +++ b/lib/redmine/scm/adapters/git_adapter.rb @@ -190,23 +190,23 @@ module Redmine lines = [] git_cmd(cmd_args) {|io| lines = io.readlines} begin - id = lines[0].split[1] - author = lines[1].match('Author:\s+(.*)$')[1] - time = Time.parse(lines[4].match('CommitDate:\s+(.*)$')[1]) - Revision. - new( - { - :identifier => id, - :scmid => id, - :author => author, - :time => time, - :message => nil, - :paths => nil - } - ) + id = lines[0].split[1] + author = lines[1].match('Author:\s+(.*)$')[1] + time = Time.parse(lines[4].match('CommitDate:\s+(.*)$')[1]) + Revision. + new( + { + :identifier => id, + :scmid => id, + :author => author, + :time => time, + :message => nil, + :paths => nil + } + ) rescue NoMethodError => e - logger.error("The revision '#{path}' has a wrong format") - return nil + logger.error("The revision '#{path}' has a wrong format") + return nil end rescue ScmCommandAborted nil