From 38d5925d70d79193452d1d86fde9d48e0d78ba11 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Fri, 13 May 2011 06:03:26 +0000 Subject: [PATCH] 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 --- lib/redmine/scm/adapters/git_adapter.rb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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 -- 2.39.5