From: James Moger Date: Tue, 4 Dec 2012 16:20:22 +0000 (-0500) Subject: Fixed regression in sendmail-html.groovy X-Git-Tag: v1.2.0~26 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=fddab0300aaec0741f8b2de86952c675f82948dd;p=gitblit.git Fixed regression in sendmail-html.groovy --- diff --git a/groovy/sendmail-html.groovy b/groovy/sendmail-html.groovy index 06f1e3ed..16920735 100644 --- a/groovy/sendmail-html.groovy +++ b/groovy/sendmail-html.groovy @@ -370,16 +370,15 @@ class HtmlMailWriter { formatter.setDiffComparator(RawTextComparator.DEFAULT); def diffs - RevWalk rw = new RevWalk(repository); + RevWalk rw = new RevWalk(repository) if (commit.parentCount > 0) { - RevWalk rw = new RevWalk(repository); - RevCommit parent = rw.parseCommit(commit.parents[0].id); - rw.dispose(); + RevCommit parent = rw.parseCommit(commit.parents[0].id) diffs = formatter.scan(parent.tree, commit.tree) } else { diffs = formatter.scan(new EmptyTreeIterator(), new CanonicalTreeParser(null, rw.objectReader, commit.tree)) } + rw.dispose() // Write status table builder.table('class':"plain") { tbody() {