1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-19 15:01:14 +00:00

cleanup: rubocop: fix Layout/IndentFirstHashElement in lib/redmine/scm/adapters/git_adapter.rb

git-svn-id: http://svn.redmine.org/redmine/trunk@19198 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2019-11-23 14:26:58 +00:00
parent 75acf141d5
commit df7188a2e5

View File

@ -176,15 +176,17 @@ module Redmine
id = lines[0].split[1] id = lines[0].split[1]
author = lines[1].match('Author:\s+(.*)$')[1] author = lines[1].match('Author:\s+(.*)$')[1]
time = Time.parse(lines[4].match('CommitDate:\s+(.*)$')[1]) time = Time.parse(lines[4].match('CommitDate:\s+(.*)$')[1])
Revision.
Revision.new({ new(
{
:identifier => id, :identifier => id,
:scmid => id, :scmid => id,
:author => author, :author => author,
:time => time, :time => time,
:message => nil, :message => nil,
:paths => nil :paths => nil
}) }
)
rescue NoMethodError => e rescue NoMethodError => e
logger.error("The revision '#{path}' has a wrong format") logger.error("The revision '#{path}' has a wrong format")
return nil return nil
@ -236,7 +238,10 @@ module Redmine
parents_str = $2 parents_str = $2
if [1, 2].include?(parsing_descr) if [1, 2].include?(parsing_descr)
parsing_descr = 0 parsing_descr = 0
revision = Revision.new({ revision =
Revision.
new(
{
:identifier => changeset[:commit], :identifier => changeset[:commit],
:scmid => changeset[:commit], :scmid => changeset[:commit],
:author => changeset[:author], :author => changeset[:author],
@ -244,7 +249,8 @@ module Redmine
:message => changeset[:description], :message => changeset[:description],
:paths => files, :paths => files,
:parents => changeset[:parents] :parents => changeset[:parents]
}) }
)
if block_given? if block_given?
yield revision yield revision
else else
@ -290,7 +296,10 @@ module Redmine
end end
if changeset[:commit] if changeset[:commit]
revision = Revision.new({ revision =
Revision.
new(
{
:identifier => changeset[:commit], :identifier => changeset[:commit],
:scmid => changeset[:commit], :scmid => changeset[:commit],
:author => changeset[:author], :author => changeset[:author],
@ -298,7 +307,8 @@ module Redmine
:message => changeset[:description], :message => changeset[:description],
:paths => files, :paths => files,
:parents => changeset[:parents] :parents => changeset[:parents]
}) }
)
if block_given? if block_given?
yield revision yield revision
else else