commit: add function to unparse a commit and its parents