git2json icon indicating copy to clipboard operation
git2json copied to clipboard

Fixed parse_message_line error

Open nitzanfarhi opened this issue 1 year ago • 2 comments

When the code in parser.py:70 is called:

 commit['message'] = "\n".join(
        parse_message_line(msgline)
        for msgline in
        parts['message'].splitlines()
    )

and parse_message_line is returned as None, and exception is thrown. The solution was simple, swap None with newline.

nitzanfarhi avatar Sep 16 '24 08:09 nitzanfarhi

I haven't looked at this code in over a decade but as far as I can tell there shouldn't be an exception due to Nones getting filtered out here: https://github.com/tarmstrong/git2json/blob/master/git2json/parser.py#L79

Do you have an example exception?

tarmstrong avatar Sep 26 '24 16:09 tarmstrong

It seems like I have an older version, I'll use the master instead of pip. Thanks :)

nitzanfarhi avatar Sep 26 '24 19:09 nitzanfarhi