diff options
-rw-r--r-- | groovy/sendmail-html.groovy | 4 |
1 files changed, 3 insertions, 1 deletions
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(),
|