loop over commits