Don't die on the first commit to a repository. #58
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This tool should be able to build release notes even for a repository that has no prior releases. One problem with such a repository is that we go back to the very first commit in the repository when viewing the history (by design). This commit has no parents (it should be fairly unique in this regard).
This code was expecting there to always be a parent commit and was causing an underflow exception when trying to access the first vertex in the set of parent vertices. A simple check on
isEmptylets us handle this case. It's not an error case, but we do need to stop iterating (there is no newcurrentto walk to). The last commit (or first commit depending on your POV) will still get included it the list of "first parents" since it may include important changes and should be represented by the release notes.