summaryrefslogtreecommitdiffstats
path: root/groovy
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2012-12-03 21:48:36 -0500
committerJames Moger <james.moger@gitblit.com>2012-12-03 21:48:36 -0500
commit59c6c1a53e5f00680d81ce2fd61b1b70176fde99 (patch)
tree40496213017c9df6bdb231e08755ad37608ddc05 /groovy
parent8ee931e0a051b73c1128e8fa73ead9084c6d2e09 (diff)
downloadgitblit-59c6c1a53e5f00680d81ce2fd61b1b70176fde99.tar.gz
gitblit-59c6c1a53e5f00680d81ce2fd61b1b70176fde99.zip
Fix for null parent in sendmail-html
Diffstat (limited to 'groovy')
-rw-r--r--groovy/sendmail-html.groovy4
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(),