]> source.dussan.org Git - gitblit.git/commitdiff
Fix for null parent in sendmail-html
authorJames Moger <james.moger@gitblit.com>
Tue, 4 Dec 2012 02:48:36 +0000 (21:48 -0500)
committerJames Moger <james.moger@gitblit.com>
Tue, 4 Dec 2012 02:48:36 +0000 (21:48 -0500)
groovy/sendmail-html.groovy

index e0cdecdb0536bd2585dcaeef647478d21e9236cb..06f1e3ed7d27ba89e55fef5d3d8dbf6dd30f475a 100644 (file)
@@ -372,7 +372,9 @@ class HtmlMailWriter {
         def diffs\r
         RevWalk rw = new RevWalk(repository);\r
         if (commit.parentCount > 0) {\r
-            RevCommit parent = commit.parents[0]\r
+                       RevWalk rw = new RevWalk(repository);\r
+                       RevCommit parent = rw.parseCommit(commit.parents[0].id);\r
+                       rw.dispose();\r
             diffs = formatter.scan(parent.tree, commit.tree)\r
         } else {\r
             diffs = formatter.scan(new EmptyTreeIterator(),\r