Fix hash definition in `write_commits`