From: Toshi MARUYAMA Date: Fri, 13 May 2011 06:03:26 +0000 (+0000) Subject: scm: git: back out r5673 (#7146). X-Git-Tag: 1.2.0~116 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=38d5925d70d79193452d1d86fde9d48e0d78ba11;p=redmine.git scm: git: back out r5673 (#7146). recovery "block_given?" in adapter. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5777 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/lib/redmine/scm/adapters/git_adapter.rb b/lib/redmine/scm/adapters/git_adapter.rb index 8b1afd5a7..1540a2e4b 100644 --- a/lib/redmine/scm/adapters/git_adapter.rb +++ b/lib/redmine/scm/adapters/git_adapter.rb @@ -214,7 +214,11 @@ module Redmine :message => changeset[:description], :paths => files }) - revs << revision + if block_given? + yield revision + else + revs << revision + end changeset = {} files = [] end @@ -260,7 +264,11 @@ module Redmine :message => changeset[:description], :paths => files }) - revs << revision + if block_given? + yield revision + else + revs << revision + end end end revs