fold hunk summary calculation into process_hunk.