The git log parser will incorrectly parse an empty message if a commit message begins with a non-numeric token followed by a '-' token.
e.g. A commit with the message "JIRA-1234 - Checkpoint: fixed more bugs" will be parsed as "".
The reason is evident in the last block of CliGitLog.parseLine() where the parsing of file data begins. It falsely assumes that a legitimate comment message cannot exist as above.
Suggest fix:
Since it seems that git prints out all the commit messages with a white-space indent it is easy to differentiate a message from file summary data.
Add something like:
if (line.startsWith(" ")){
response.setMessage(line);
return;
}
to the start of that block or as a prior if-else condition
Hi,
I've created a JavaGit fork located at http://bit-man.github.io/SwissArmyJavaGit/ and this problem seems to be fixed in last version (unless it doesn't happen in my Linux box).
Please feel free to clone the repository or download it.
Hope this helps
Last edit: Victor A. Rodriguez 2013-10-20