Rename comit to commit

Fix a typo in a private method.