danielflower / maven-gitlog-plugin

Generates a change log for maven projects using git

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

plugin crashes when using <includeCommitsAfter>

zwik opened this issue · comments

We run the latest version of the plugin 1.13.15 but it keeps crashing on new GIT repositories for us. Here's a part of what I think is the most important part of the stack of the crash:

Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
    at org.eclipse.jgit.revwalk.RevCommit.getParent (RevCommit.java:295)
    at com.github.danielflower.mavenplugins.gitlog.filters.PathCommitFilter.isFoundInPath (PathCommitFilter.java:48)
    at com.github.danielflower.mavenplugins.gitlog.filters.PathCommitFilter.renderCommit (PathCommitFilter.java:40)
    at com.github.danielflower.mavenplugins.gitlog.Generator.show (Generator.java:108)
    at com.github.danielflower.mavenplugins.gitlog.Generator.generate (Generator.java:82)
    at com.github.danielflower.mavenplugins.gitlog.GenerateMojo.execute (GenerateMojo.java:348)

You can see that it actually crashes in the jgit plugin. I've been looking into the POM and it seems the plugin is using an older version of the jgit plugin... Not even the original Eclipse one. Should this be bumped to a newer version?

It wasn't the issue. If no parent commit can be found it can be crashed. I'll create a pull request.

Release version is 1.13.16 - thanks!