Commit parser

nit: Not sure but I think the convention for Mozilla code is the `then` keyword be in the same line as `if`.