diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-04-24 09:55:26 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-04-24 09:55:26 +0000 |
commit | fb9fed39feb34bfa4a78a654c171bbb5012a4289 (patch) | |
tree | 10d56e8cb2624ce55bff8f55561e00648309ba43 /lib/redmine/scm/adapters/git_adapter.rb | |
parent | f29a4dd6c586a6de36a3b1ee54603c4c7fad453f (diff) | |
download | redmine-fb9fed39feb34bfa4a78a654c171bbb5012a4289.tar.gz redmine-fb9fed39feb34bfa4a78a654c171bbb5012a4289.zip |
scm: git: code clean up adapter.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5544 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/scm/adapters/git_adapter.rb')
-rw-r--r-- | lib/redmine/scm/adapters/git_adapter.rb | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/lib/redmine/scm/adapters/git_adapter.rb b/lib/redmine/scm/adapters/git_adapter.rb index 0c0b975a5..e6b5a761f 100644 --- a/lib/redmine/scm/adapters/git_adapter.rb +++ b/lib/redmine/scm/adapters/git_adapter.rb @@ -144,7 +144,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 << rev if rev + cmd_args << rev if rev cmd_args << "--" << path unless path.empty? lines = [] scm_cmd(*cmd_args) { |io| lines = io.readlines } @@ -155,11 +155,11 @@ module Redmine Revision.new({ :identifier => id, - :scmid => id, - :author => author, - :time => time, - :message => nil, - :paths => nil + :scmid => id, + :author => author, + :time => time, + :message => nil, + :paths => nil }) rescue NoMethodError => e logger.error("The revision '#{path}' has a wrong format") @@ -195,11 +195,11 @@ module Redmine parsing_descr = 0 revision = Revision.new({ :identifier => changeset[:commit], - :scmid => changeset[:commit], - :author => changeset[:author], - :time => Time.parse(changeset[:date]), - :message => changeset[:description], - :paths => files + :scmid => changeset[:commit], + :author => changeset[:author], + :time => Time.parse(changeset[:date]), + :message => changeset[:description], + :paths => files }) if block_given? yield revision @@ -245,11 +245,11 @@ module Redmine if changeset[:commit] revision = Revision.new({ :identifier => changeset[:commit], - :scmid => changeset[:commit], - :author => changeset[:author], - :time => Time.parse(changeset[:date]), - :message => changeset[:description], - :paths => files + :scmid => changeset[:commit], + :author => changeset[:author], + :time => Time.parse(changeset[:date]), + :message => changeset[:description], + :paths => files }) if block_given? |