]> source.dussan.org Git - gitblit.git/commitdiff
Fixed regression in sendmail-html.groovy
authorJames Moger <james.moger@gitblit.com>
Tue, 4 Dec 2012 16:20:22 +0000 (11:20 -0500)
committerJames Moger <james.moger@gitblit.com>
Tue, 4 Dec 2012 16:20:22 +0000 (11:20 -0500)
groovy/sendmail-html.groovy

index 06f1e3ed7d27ba89e55fef5d3d8dbf6dd30f475a..169207359de155e5c01414010cd84704fe713f64 100644 (file)
@@ -370,16 +370,15 @@ class HtmlMailWriter {
         formatter.setDiffComparator(RawTextComparator.DEFAULT);\r
 \r
         def diffs\r
-        RevWalk rw = new RevWalk(repository);\r
+               RevWalk rw = new RevWalk(repository)\r
         if (commit.parentCount > 0) {\r
-                       RevWalk rw = new RevWalk(repository);\r
-                       RevCommit parent = rw.parseCommit(commit.parents[0].id);\r
-                       rw.dispose();\r
+                       RevCommit parent = rw.parseCommit(commit.parents[0].id)\r
             diffs = formatter.scan(parent.tree, commit.tree)\r
         } else {\r
             diffs = formatter.scan(new EmptyTreeIterator(),\r
                                    new CanonicalTreeParser(null, rw.objectReader, commit.tree))\r
         }\r
+               rw.dispose()\r
         // Write status table\r
         builder.table('class':"plain") {\r
             tbody() {\r