From: James Moger Date: Tue, 4 Dec 2012 02:48:36 +0000 (-0500) Subject: Fix for null parent in sendmail-html X-Git-Tag: v1.2.0~30 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=59c6c1a53e5f00680d81ce2fd61b1b70176fde99;p=gitblit.git Fix for null parent in sendmail-html --- diff --git a/groovy/sendmail-html.groovy b/groovy/sendmail-html.groovy index e0cdecdb..06f1e3ed 100644 --- a/groovy/sendmail-html.groovy +++ b/groovy/sendmail-html.groovy @@ -372,7 +372,9 @@ class HtmlMailWriter { def diffs RevWalk rw = new RevWalk(repository); if (commit.parentCount > 0) { - RevCommit parent = commit.parents[0] + RevWalk rw = new RevWalk(repository); + RevCommit parent = rw.parseCommit(commit.parents[0].id); + rw.dispose(); diffs = formatter.scan(parent.tree, commit.tree) } else { diffs = formatter.scan(new EmptyTreeIterator(),