use pop_commit() for consuming the first entry of a struct commit_list