]> source.dussan.org Git - redmine.git/commitdiff
scm: git: back out r5673 (#7146).
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 13 May 2011 06:03:26 +0000 (06:03 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 13 May 2011 06:03:26 +0000 (06:03 +0000)
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

index 8b1afd5a7d7ccb67cc5a7495f37e388d5257b32b..1540a2e4b18ef897cd34a8d2e64bc700c81359cf 100644 (file)
@@ -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