Inserting parents of a commit into the db